|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AuthenticationModule
A module which can authenticate a user. It also provides the necessary tools
to log a user in, out, and modify requests from a Pipe so they are
seen as authenticated.
| Method Summary | |
|---|---|
void |
enroll(Map<String,String> userData,
Callback<HeaderAndBody> callback)
Will try to register a user with a service using userData. |
AuthorizationFields |
getAuthorizationFields()
Deprecated. This method has been superseded by getAuthorizationFields(java.net.URI, String, byte[]) |
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(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. |
| Method Detail |
|---|
URL getBaseURL()
String getLoginEndpoint()
String getLogoutEndpoint()
String getEnrollEndpoint()
void enroll(Map<String,String> userData,
Callback<HeaderAndBody> callback)
userData - callback -
void login(String username,
String password,
Callback<HeaderAndBody> callback)
username - password - callback - void logout(Callback<Void> callback)
callback - boolean isLoggedIn()
@Deprecated AuthorizationFields getAuthorizationFields()
getAuthorizationFields(java.net.URI, String, byte[])
Pipe 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.
AuthorizationFields getAuthorizationFields(URI requestUri,
String method,
byte[] requestBody)
Pipe 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.
boolean retryLogin()
throws HttpException
HttpException
|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||