public class AuthenticationServiceImpl extends Object implements AuthenticationService
| Modifier and Type | Field and Description |
|---|---|
private static String |
AUTH_SECRET |
private static String |
AUTH_TOKEN |
private AuthenticationManager |
authenticationManager |
private IdentityManagement |
configuration |
static String |
DEFAULT_ROLE |
private javax.enterprise.inject.Instance<String> |
loggedUser |
private javax.enterprise.inject.Instance<String> |
secret |
private javax.enterprise.inject.Instance<String> |
token |
| Constructor and Description |
|---|
AuthenticationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getSecret()
Retrieves the shared secret to the current user logged in
|
javax.ws.rs.core.Response |
login(AeroGearUser aeroGearUser)
Logs in the specified
AeroGearUser |
void |
logout()
Logs out the specified
AeroGearUser from the system. |
javax.ws.rs.core.Response |
otpLogin(AeroGearUser aeroGearUser)
Logs in the specified
AeroGearUser with the provided OTP |
javax.ws.rs.core.Response |
register(AeroGearUser aeroGearUser)
AeroGearUser registration |
private static final String AUTH_TOKEN
private static final String AUTH_SECRET
public static final String DEFAULT_ROLE
@Inject private AuthenticationManager authenticationManager
@Inject private IdentityManagement configuration
@Inject @LoggedUser private javax.enterprise.inject.Instance<String> loggedUser
public javax.ws.rs.core.Response login(AeroGearUser aeroGearUser)
AeroGearUserlogin in interface AuthenticationServiceaeroGearUser - represents a simple implementation that holds user's credentials.public javax.ws.rs.core.Response otpLogin(AeroGearUser aeroGearUser)
AeroGearUser with the provided OTPotpLogin in interface AuthenticationServiceaeroGearUser - represents a simple implementation that holds user's credentials.public javax.ws.rs.core.Response register(AeroGearUser aeroGearUser)
AeroGearUser registrationregister in interface AuthenticationServiceaeroGearUser - represents a simple implementation that holds user's credentials.public void logout()
AeroGearUser from the system.logout in interface AuthenticationServiceAeroGearSecurityException - on logout failure
HttpExceptionMapper return the HTTP status codepublic javax.ws.rs.core.Response getSecret()
getSecret in interface AuthenticationServiceCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.