wso2 - API Manger OAuth Token Revoke is Problematic -
I am using SAML2 Bearer Agency Profile to receive OAuth token form WSO2 API Manager I have two client applications in the Oath Token Revoking process, I am using the following code,
throws public static Boolean Rivoc token (token token) IOException {// APIs to Gunner URL token Create connection with endpoint url = New URL (Config.apiMangerOAuthRevokeURL); HttpURL Connection Connection = (HttpURL Connection) url.openConnection (); Connection.setRequestMethod ("post"); Connection.setRequestProperty ("content-type", "application / x-www-form-urled; charset = UTF-8"); String User Credentials = Config.apiMangerClientID + ":" + Config.apiMangerClientSecret; String root = "basic" + new string (base 64. encodebits (user credentials .getBytes ())); Basic element = root.Restore all ("\\ r \\ n", ""); // Set consumer-key and consumer-secret connection .setRequestProperty ("authorization", originally); Connection.setUseCaches (wrong); connection.setDoInput (true); Connection.setDoOutput (true); // Send Request DataOutputStream wr = New DataOutputStream (connection.getOutputStream ()); Wr.writeBytes ("token =" + token.getAccess_token ()); Wr.flush (); Wr.close (); // Receive feedback InputStream iss = connection.getInputStream (); Buffedrder RD = New buffed reader (neweststream reader (AIS)); String line; String buffer response string = new stringbuffer (); While ((line = rd.readLine ()) = null) {responseString.append (line); responseString.append ('\ r'); } Rd.close (); System.out.println ("cancellation of token mobile -" + token.getAccess_token ()); System.out.println ("Revolving Revolution Mobile -" + Response Strings. String ()); Return true; } The process to cancel a client application is OK. I tried to use the curl after the revocation of the API, it fails in the expected form, but other client applications that use the above argument to cancel the token, they come back well. But after cancellation, the token is valid. I can use curl to query ARP. What has gone wrong here? help please!
API manager's caching is enabled by default and set to 15 minutes . Try disabling it.
Comments
Post a Comment