public class DatabaseAuthenticationMechanism extends Object implements AuthenticationMechanism<UserDetails>
UserDetailsProvider to find and provide
details about the account that you are trying to authenticate.
This aproach is similiar to the one used by Spring Security.| Constructor and Description |
|---|
DatabaseAuthenticationMechanism(UserDetailsProvider userDetailsProvider)
Constructor, initialize the mechanism of authentication with the
UserDetailsProvider implementation |
| Modifier and Type | Method and Description |
|---|---|
UserDetails |
getAccount(String username)
Provide the necessary data for the account to the
Realm that you
want to use for authentication |
Set<String> |
getPermissions(String username)
Provide a list of permissions for the given username
|
public DatabaseAuthenticationMechanism(UserDetailsProvider userDetailsProvider)
UserDetailsProvider implementationuserDetailsProvider - the implementation of the user details providerpublic UserDetails getAccount(String username)
Realm that you
want to use for authenticationgetAccount in interface AuthenticationMechanism<UserDetails>username - public Set<String> getPermissions(String username)
getPermissions in interface AuthenticationMechanism<UserDetails>username - Copyright © 2018 Arthur Gregorio. All rights reserved.