public final class AuthorizationClientHelper extends Object
SampleAuthorizationClient
for an example usage.Modifier and Type | Method and Description |
---|---|
static AccessToken |
getAccessToken()
Authenticates the client with the Authorization Service, obtains an access token and returns it.
|
static AccessToken |
getAccessToken(List scopes)
Authenticates the client with the Authorization Service, obtains an access token and returns it; the client can request for specific
scopes during authentication by using the "scopes" parameter.
|
static AccessToken |
getAccessTokenForUser(String userName,
String userPassword)
Authenticates the client and the end user with the Authorization Service, obtains an access token and returns it.
|
static AccessToken |
getAccessTokenForUser(String userName,
String userPassword,
List scopes)
Authenticates the client and the end user with the Authorization Service, obtains an access token and returns it; the client can
request for specific scopes during authentication by using the "scopes" parameter.
|
static void |
shutdown()
Shuts down the helper library and releases any system resources associated with it.
|
public static AccessToken getAccessToken() throws AuthorizationHelperException, HttpResponseException
AccessToken
AuthorizationHelperException
HttpResponseException
public static AccessToken getAccessToken(List scopes) throws AuthorizationHelperException, HttpResponseException
scopes
- The list of scopes the client wants to specify while making the token request.AccessToken
AuthorizationHelperException
HttpResponseException
public static AccessToken getAccessTokenForUser(String userName, String userPassword) throws AuthorizationHelperException, HttpResponseException
userName
- The user name for whom the token is being requested.userPassword
- The user's password.AccessToken
AuthorizationHelperException
HttpResponseException
public static AccessToken getAccessTokenForUser(String userName, String userPassword, List scopes) throws AuthorizationHelperException, HttpResponseException
userName
- The user name for whom the token is being requested.userPassword
- The user's password.scopes
- The list of scopes the client wants to specify while making the token request.AccessToken
AuthorizationHelperException
HttpResponseException
public static void shutdown()
Copyright © 2016 Avaya. All Rights Reserved.