public class OAuth2AuthzModule extends Object implements AuthzModule
| Constructor and Description |
|---|
OAuth2AuthzModule(AuthzConfig config) |
| Modifier and Type | Method and Description |
|---|---|
AuthorizationFields |
getAuthorizationFields(URI requestUri,
String method,
byte[] requestBody)
This method is called be
Pipe implementations when they need
security applied to their HttpProvider. |
boolean |
hasCredentials()
This function checks if a module has all of the necessary information to
make a authorized request.
|
boolean |
isAuthorized()
If a module is Authorized that means that it can be used to provide
authorization meta-data to calling code.
|
boolean |
refreshAccess()
Refreshing access will synchronously check the current of the tokens and
refresh them if necessary.
|
void |
requestAccess(android.app.Activity activity,
Callback<String> callback)
Begin requesting access for the application.
|
public OAuth2AuthzModule(AuthzConfig config)
public boolean isAuthorized()
AuthzModuleisAuthorized in interface AuthzModulepublic boolean hasCredentials()
AuthzModuleAuthzModule.isAuthorized()hasCredentials in interface AuthzModulepublic void requestAccess(android.app.Activity activity,
Callback<String> callback)
AuthzModulerequestAccess in interface AuthzModuleactivity - the calling activity.callback - a callback to be called upon completion of the
authorization action.public AuthorizationFields getAuthorizationFields(URI requestUri, String method, byte[] requestBody)
AuthzModulePipe implementations when they need
security applied to their HttpProvider. The headers/data/query
parameters returned should be applied to the Url and HttpProvider
directly before a call.getAuthorizationFields in interface AuthzModulerequestUri - the Request-Line URI.method - the HTTP method being usedrequestBody - the body of the request. This method promises to not
modify the body.public boolean refreshAccess()
AuthzModulerefreshAccess in interface AuthzModuleCopyright © 2014 JBoss by Red Hat. All rights reserved.