@ApplicationScoped public class PicketLinkAuthenticationService extends Object implements AuthenticationService
Constructor and Description |
---|
PicketLinkAuthenticationService() |
Modifier and Type | Method and Description |
---|---|
User |
getUser()
Get the currently authenticated user.
|
boolean |
isLoggedIn() |
User |
login(String username,
String password)
Login with the given username and password, throwing an exception if the login fails.
|
void |
logout()
Log out the currently authenticated user.
|
public User login(String username, String password)
AuthenticationService
login
in interface AuthenticationService
username
- The username to log in with.password
- The password to authenticate with.User
.public boolean isLoggedIn()
isLoggedIn
in interface AuthenticationService
public void logout()
AuthenticationService
logout
in interface AuthenticationService
public User getUser()
AuthenticationService
getUser
in interface AuthenticationService
null
. If no
user is logged in, returns User.ANONYMOUS
.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.