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