public class WLAuthorizationManagerInternal
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Request |
addAuthorizationHeader(Request request,
java.lang.String authorizationHeader) |
void |
cacheScopeByResource(Request request,
java.lang.String scope) |
void |
cacheScopeByResource(java.lang.String url,
java.lang.String method,
java.lang.String scope) |
void |
clearAccessToken(AccessToken accessToken) |
void |
clearCachedResourcesAndToken() |
void |
clearRegistration() |
void |
clearScopeByResource(Request request) |
java.lang.String |
getAuthorizationHeader(Response response) |
java.lang.String |
getAuthorizationScope(java.net.HttpURLConnection connection) |
java.lang.String |
getAuthorizationScope(Response response) |
java.lang.String |
getAuthorizationServerRootPath() |
java.net.URL |
getAuthorizationServerRootPathAsURL() |
AccessToken |
getCachedAccessToken(java.lang.String scope)
Retrieves the cached authorization header by scope.
|
java.lang.String |
getCachedRefreshToken(java.lang.String scope)
Retrieves the cached Refresh Token String
If there is no cached Refresh Token this method will return null.
|
java.lang.String |
getClientId() |
static WLAuthorizationManagerInternal |
getInstance() |
java.lang.String |
getScopeByResource(java.lang.String url,
java.lang.String method) |
void |
invokeAuthorizationRequest(java.lang.String scope,
WLResponseListener listener) |
void |
invokeAuthorizationRequestForScope(java.lang.String scope,
WLResponseListener hybridListener) |
void |
invokeGetRegistrationDataRequest(WLRequestListener listener) |
void |
invokeRegistrationRequest(WLRequestListener listener) |
boolean |
isAuthorizationRequired(int status,
java.util.Map headers) |
boolean |
isAuthorizationRequired(Response response) |
boolean |
isForbidden(Response response) |
boolean |
isMfpConflict(WLResponse response) |
boolean |
isRegistrationInProgress() |
void |
login(java.lang.String securityCheck,
JSONObject credentials,
WLLoginResponseListener listener) |
void |
logout(java.lang.String securityCheck,
WLLogoutResponseListener listener)
Logout from specific securityCheck
|
void |
obtainAccessToken(java.lang.String scope,
WLAccessTokenListener listener) |
void |
removeTokenByScope(java.lang.String scope) |
void |
setAuthorizationServerUrl(java.net.URL url) |
void |
setLoginTimeout(int loginTimeout) |
boolean |
shouldRegister()
Verifies the client application data, returns true if this client's data hasn't changed (such as app version)
This determines is the client should be sent to registration or continue to authorization -
note that new clients have no registered data so this will return true as designed
|
public static WLAuthorizationManagerInternal getInstance()
public boolean isRegistrationInProgress()
public Request addAuthorizationHeader(Request request, java.lang.String authorizationHeader)
public boolean isMfpConflict(WLResponse response)
public void obtainAccessToken(java.lang.String scope, WLAccessTokenListener listener)
public boolean isAuthorizationRequired(Response response)
public boolean isForbidden(Response response)
public boolean isAuthorizationRequired(int status, java.util.Map headers)
public java.lang.String getClientId()
public void clearRegistration()
public java.lang.String getAuthorizationScope(java.net.HttpURLConnection connection)
public java.lang.String getAuthorizationScope(Response response)
public java.lang.String getAuthorizationHeader(Response response)
public void clearCachedResourcesAndToken()
public void clearScopeByResource(Request request)
public void invokeAuthorizationRequestForScope(java.lang.String scope, WLResponseListener hybridListener)
public void cacheScopeByResource(Request request, java.lang.String scope)
public void cacheScopeByResource(java.lang.String url, java.lang.String method, java.lang.String scope)
public java.lang.String getScopeByResource(java.lang.String url, java.lang.String method)
public void invokeRegistrationRequest(WLRequestListener listener)
public void login(java.lang.String securityCheck, JSONObject credentials, WLLoginResponseListener listener)
public void logout(java.lang.String securityCheck, WLLogoutResponseListener listener)
securityCheck
- to logout fromlistener
- with response function. If login fail, the listener will get the error.public AccessToken getCachedAccessToken(java.lang.String scope)
public java.lang.String getCachedRefreshToken(java.lang.String scope)
public void clearAccessToken(AccessToken accessToken)
public void removeTokenByScope(java.lang.String scope)
public void setLoginTimeout(int loginTimeout)
public void setAuthorizationServerUrl(java.net.URL url)
public java.lang.String getAuthorizationServerRootPath()
public java.net.URL getAuthorizationServerRootPathAsURL()
public boolean shouldRegister()
public void invokeAuthorizationRequest(java.lang.String scope, WLResponseListener listener)
public void invokeGetRegistrationDataRequest(WLRequestListener listener)