Interface SecurityAuthenticator
-
- All Known Implementing Classes:
JAASSecurityAuthenticator
,SecurityAuthenticatorSupport
public interface SecurityAuthenticator
ASecurityAuthenticator
allows to plugin custom authenticators, such as JAAS based or custom implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getName()
Gets the name of the realm.String
getUserRoles(Subject subject)
Gets the user roles from the givenSubject
Subject
login(HttpPrincipal principal)
Attempts to login thePrincipal
on this realm.void
logout(Subject subject)
Attempt to logout the subject.void
setName(String name)
Sets the name of the realm to use.void
setRoleClassNames(String names)
Sets the role class names (separated by comma)
-
-
-
Method Detail
-
setName
void setName(String name)
Sets the name of the realm to use.
-
getName
String getName()
Gets the name of the realm.
-
setRoleClassNames
void setRoleClassNames(String names)
Sets the role class names (separated by comma) By default if no explicit role class names has been configured, then this implementation will assume theSubject
Principal
s is a role if the classname contains the word role (lower cased).- Parameters:
names
- a list of FQN class names for rolePrincipal
implementations.
-
login
Subject login(HttpPrincipal principal) throws LoginException
Attempts to login thePrincipal
on this realm. The login is a success if no Exception is thrown, and aSubject
is returned.- Parameters:
principal
- the principal- Returns:
- the subject for the logged in principal, must not be null
- Throws:
LoginException
- is thrown if error logging in thePrincipal
-
logout
void logout(Subject subject) throws LoginException
Attempt to logout the subject.- Parameters:
subject
- subject to logout- Throws:
LoginException
- is thrown if error logging out subject
-
-