public interface AuthenticationService
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.
|
User login(String username, String password)
username
- The username to log in with.password
- The password to authenticate with.User
.Implementations
- should throw an AuthenticationException
if authentication fails.boolean isLoggedIn()
void logout()
User getUser()
null
. If no
user is logged in, returns User.ANONYMOUS
.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.