public class OAuthClient
extends java.lang.Object
Constructor and Description |
---|
OAuthClient() |
OAuthClient(MessageContext messageContext) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateToken(java.lang.String tokenApiUrl,
java.lang.String payload,
java.lang.String credentials)
Method to generate the access token from an OAuth server
|
org.apache.http.impl.client.CloseableHttpClient |
getDefaultHttpClient() |
public OAuthClient(MessageContext messageContext) throws AuthException
AuthException
public OAuthClient()
public java.lang.String generateToken(java.lang.String tokenApiUrl, java.lang.String payload, java.lang.String credentials) throws AuthException, java.io.IOException
tokenApiUrl
- The token url of the serverpayload
- The payload of the requestcredentials
- The encoded credentialsAuthException
- In the event of an unexpected HTTP status code return from the server or access_token
key missing in the response payloadjava.io.IOException
- In the event of a problem parsing the response from the serverpublic org.apache.http.impl.client.CloseableHttpClient getDefaultHttpClient()
Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.