|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.aerogear.android.authentication.AbstractAuthenticationModule
org.jboss.aerogear.android.authentication.impl.AGSecurityAuthenticationModule
public final class AGSecurityAuthenticationModule
A module for authenticating with restful AG services.
| Field Summary |
|---|
| Fields inherited from class org.jboss.aerogear.android.authentication.AbstractAuthenticationModule |
|---|
THREAD_POOL_EXECUTOR |
| Constructor Summary | |
|---|---|
AGSecurityAuthenticationModule(URL baseURL,
AuthenticationConfig config)
|
|
| Method Summary | |
|---|---|
void |
enroll(Map<String,String> userData,
Callback<HeaderAndBody> callback)
Will try to register a user with a service using userData. |
AuthorizationFields |
getAuthorizationFields()
This method is called be Pipe implementations when they need
security applied to their HttpProvider. |
AuthorizationFields |
getAuthorizationFields(URI requestUri,
String method,
byte[] requestBody)
This method is called be Pipe implementations when they need
security applied to their HttpProvider. |
URL |
getBaseURL()
|
String |
getEnrollEndpoint()
|
String |
getLoginEndpoint()
|
String |
getLogoutEndpoint()
|
boolean |
isLoggedIn()
|
void |
login(Map<String,String> loginData,
Callback<HeaderAndBody> callback)
|
void |
login(String username,
String password,
Callback<HeaderAndBody> callback)
Will try to log in a user using username and password. |
void |
logout(Callback<Void> callback)
Performs a logout of the current user. |
boolean |
retryLogin()
Some authorization schemes (HTTP Digest, OAUTH) have a mechanism for retrying a login to fetch fresh credentials after the credentials expire. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AGSecurityAuthenticationModule(URL baseURL,
AuthenticationConfig config)
baseURL - config -
IllegalArgumentException - if an endpoint can not be appended to
baseURL| Method Detail |
|---|
public URL getBaseURL()
public String getLoginEndpoint()
public String getLogoutEndpoint()
public String getEnrollEndpoint()
public void enroll(Map<String,String> userData,
Callback<HeaderAndBody> callback)
AuthenticationModule
enroll in interface AuthenticationModuleenroll in class AbstractAuthenticationModule
public void login(String username,
String password,
Callback<HeaderAndBody> callback)
AuthenticationModule
login in interface AuthenticationModulelogin in class AbstractAuthenticationModule
public void login(Map<String,String> loginData,
Callback<HeaderAndBody> callback)
public void logout(Callback<Void> callback)
AuthenticationModule
logout in interface AuthenticationModulelogout in class AbstractAuthenticationModulepublic boolean isLoggedIn()
public AuthorizationFields getAuthorizationFields()
AuthenticationModulePipe 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.
public AuthorizationFields getAuthorizationFields(URI requestUri,
String method,
byte[] requestBody)
AuthenticationModulePipe 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.
requestUri - 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 retryLogin()
AuthenticationModule
|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||