public class OAuth2AuthzModule extends Object implements AuthzModule
| Constructor and Description |
|---|
OAuth2AuthzModule(org.jboss.aerogear.android.impl.authz.oauth2.OAuth2Properties config) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAccount()
This will remove all information about the account with the Module's
AccountId
|
org.jboss.aerogear.android.authentication.AuthorizationFields |
getAuthorizationFields(URI requestUri,
String method,
byte[] requestBody)
This method is called be
Pipe implementations when they need
security applied to their HttpProvider. |
boolean |
handleError(org.jboss.aerogear.android.http.HttpException exception) |
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.
|
org.jboss.aerogear.android.code.ModuleFields |
loadModule(URI relativeURI,
String httpMethod,
byte[] requestBody) |
boolean |
refreshAccess()
Refreshing access will synchronously check the current of the tokens and
refresh them if necessary.
|
void |
requestAccess(android.app.Activity activity,
org.jboss.aerogear.android.Callback<String> callback)
Begin requesting access for the application.
|
public OAuth2AuthzModule(org.jboss.aerogear.android.impl.authz.oauth2.OAuth2Properties config)
public boolean isAuthorized()
AuthzModuleisAuthorized in interface AuthzModulepublic boolean hasCredentials()
AuthzModuleAuthzModule.isAuthorized()hasCredentials in interface AuthzModulepublic void requestAccess(android.app.Activity activity,
org.jboss.aerogear.android.Callback<String> callback)
AuthzModulerequestAccess in interface AuthzModuleactivity - the calling activity.callback - a callback to be called upon completion of the
authorization action.public org.jboss.aerogear.android.authentication.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 AuthzModulepublic org.jboss.aerogear.android.code.ModuleFields loadModule(URI relativeURI, String httpMethod, byte[] requestBody)
loadModule in interface org.jboss.aerogear.android.code.PipeModulepublic boolean handleError(org.jboss.aerogear.android.http.HttpException exception)
handleError in interface org.jboss.aerogear.android.code.PipeModulepublic void deleteAccount()
AuthzModuledeleteAccount in interface AuthzModuleCopyright © 2014 JBoss by Red Hat. All rights reserved.