public class AuthUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
disableSSLVerification()
Disable SSL verification for the default URL connection.
|
static org.apache.oltu.oauth2.client.response.OAuthAccessTokenResponse |
exchangeAuthCode(String authCode)
Exchange auth code for tokens.
|
static String |
generateBasicAuthHeaderValue(String username,
String password)
Get the Base64 encoded IdP Admin Credentials.
|
static org.apache.http.client.HttpClient |
getTrustAllClient()
Get a HTTP Client which bypasses the SSL checks.
|
public static org.apache.http.client.HttpClient getTrustAllClient()
throws KeyManagementException,
NoSuchAlgorithmException
KeyManagementException - this will be thrown if an issue occurs while executing this methodNoSuchAlgorithmException - this will be thrown if an issue occurs while executing this methodpublic static void disableSSLVerification()
throws KeyManagementException,
NoSuchAlgorithmException
public static org.apache.oltu.oauth2.client.response.OAuthAccessTokenResponse exchangeAuthCode(String authCode) throws AuthProviderException, org.wso2.carbon.config.ConfigurationException, org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException
authCode - The auth code to exchange tokens forAuthProviderException - if Cellery auth failure occursorg.wso2.carbon.config.ConfigurationException - if fetching configuration failsorg.apache.oltu.oauth2.common.exception.OAuthSystemException - if OAuth exchange failsorg.apache.oltu.oauth2.common.exception.OAuthProblemException - if fetching access token failsCopyright © 2019 WSO2. All rights reserved.