public final class AGSecurityAuthenticationModule extends AbstractAuthenticationModule
| Constructor and Description |
|---|
AGSecurityAuthenticationModule(URL baseURL,
AuthenticationConfig config) |
| 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()
This method is called be
Pipe implementations when they need
security applied to their HttpProvider. |
protected String |
getAuthToken() |
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.
|
public AGSecurityAuthenticationModule(URL baseURL, AuthenticationConfig config)
baseURL - config - IllegalArgumentException - if an endpoint can not be appended to
baseURLpublic URL getBaseURL()
public String getLoginEndpoint()
public String getLogoutEndpoint()
public String getEnrollEndpoint()
public void enroll(Map<String,String> userData, Callback<HeaderAndBody> callback)
AuthenticationModuleenroll in interface AuthenticationModuleenroll in class AbstractAuthenticationModulepublic void login(String username, String password, Callback<HeaderAndBody> callback)
AuthenticationModulelogin in interface AuthenticationModulelogin in class AbstractAuthenticationModulepublic void logout(Callback<Void> callback)
AuthenticationModulelogout in interface AuthenticationModulelogout in class AbstractAuthenticationModulepublic boolean isLoggedIn()
protected String getAuthToken()
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.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.