Package org.h2.security.auth.impl
Class AssignRealmNameRole
java.lang.Object
org.h2.security.auth.impl.AssignRealmNameRole
- All Implemented Interfaces:
UserToRolesMapper
,Configurable
Assign to user a role based on realm name
*
Configuration parameters:
- roleNameFormat, optional by default is @{realm}
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(ConfigProperties configProperties) configure the componentmapUserToRoles
(AuthenticationInfo authenticationInfo) Map user identified by authentication info to a set of granted roles.
-
Field Details
-
roleNameFormat
-
-
Constructor Details
-
AssignRealmNameRole
public AssignRealmNameRole() -
AssignRealmNameRole
-
-
Method Details
-
configure
Description copied from interface:Configurable
configure the component- Specified by:
configure
in interfaceConfigurable
- Parameters:
configProperties
- = configuration properties
-
mapUserToRoles
public Collection<String> mapUserToRoles(AuthenticationInfo authenticationInfo) throws AuthenticationException Description copied from interface:UserToRolesMapper
Map user identified by authentication info to a set of granted roles.- Specified by:
mapUserToRoles
in interfaceUserToRolesMapper
- Parameters:
authenticationInfo
- authentication information- Returns:
- list of roles to be assigned to the user temporary
- Throws:
AuthenticationException
- on authentication exception
-