public interface AuthenticationModule
extends org.jboss.aerogear.android.code.PipeModule
Pipe so they are
seen as authenticated.| Modifier and Type | Method and Description |
|---|---|
void |
enroll(Map<String,String> userData,
org.jboss.aerogear.android.Callback<org.jboss.aerogear.android.http.HeaderAndBody> callback)
Will try to register a user with a service using userData.
|
org.jboss.aerogear.android.authentication.AuthorizationFields |
getAuthorizationFields(URI requestUri,
String method,
byte[] requestBody)
Deprecated.
replaced by
PipeModule.loadModule(java.net.URI, java.lang.String, byte[]) |
URL |
getBaseURL() |
String |
getEnrollEndpoint() |
String |
getLoginEndpoint() |
String |
getLogoutEndpoint() |
boolean |
isLoggedIn() |
void |
login(Map<String,String> loginData,
org.jboss.aerogear.android.Callback<org.jboss.aerogear.android.http.HeaderAndBody> callback)
Will try to log in a user
It will call the callbacks onSuccess with a parameter of a Map of the
values returned by the enroll service or onFailure if there is an error
|
void |
login(String username,
String password,
org.jboss.aerogear.android.Callback<org.jboss.aerogear.android.http.HeaderAndBody> callback)
Will try to log in a user using username and password.
|
void |
logout(org.jboss.aerogear.android.Callback<Void> callback)
Performs a logout of the current user.
|
boolean |
retryLogin()
Deprecated.
replaced by
PipeModule.handleError(org.jboss.aerogear.android.http.HttpException) |
URL getBaseURL()
String getLoginEndpoint()
String getLogoutEndpoint()
String getEnrollEndpoint()
void enroll(Map<String,String> userData, org.jboss.aerogear.android.Callback<org.jboss.aerogear.android.http.HeaderAndBody> callback)
userData - a collection of data to be passed to the server.callback - a callback which will handle the server response.void login(String username, String password, org.jboss.aerogear.android.Callback<org.jboss.aerogear.android.http.HeaderAndBody> callback)
username - the users userNamepassword - the users Passwordcallback - a callback which will handle the server response.void login(Map<String,String> loginData, org.jboss.aerogear.android.Callback<org.jboss.aerogear.android.http.HeaderAndBody> callback)
loginData - a map of data which will be passed to the servercallback - a callback which will handle the server response.void logout(org.jboss.aerogear.android.Callback<Void> callback)
callback - a callback which will handle the server response.boolean isLoggedIn()
@Deprecated org.jboss.aerogear.android.authentication.AuthorizationFields getAuthorizationFields(URI requestUri, String method, byte[] requestBody)
PipeModule.loadModule(java.net.URI, java.lang.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.requestUri - the Request-Line URI.method - the HTTP method being usedrequestBody - the body of the request. This method promises to not
modify the body.@Deprecated boolean retryLogin() throws org.jboss.aerogear.android.http.HttpException
PipeModule.handleError(org.jboss.aerogear.android.http.HttpException)org.jboss.aerogear.android.http.HttpExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.