public interface AuthenticationModule
Pipe so they are
seen as authenticated.| Modifier and Type | Method and Description |
|---|---|
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(Map<String,String> loginData,
Callback<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,
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.
|
URL getBaseURL()
String getLoginEndpoint()
String getLogoutEndpoint()
String getEnrollEndpoint()
void enroll(Map<String,String> userData, Callback<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, Callback<HeaderAndBody> callback)
username - the users userNamepassword - the users Passwordcallback - a callback which will handle the server response.void login(Map<String,String> loginData, Callback<HeaderAndBody> callback)
loginData - a map of data which will be passed to the servercallback - a callback which will handle the server response.void logout(Callback<Void> callback)
callback - a callback which will handle the server response.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
HttpExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.