Package org.h2.security.auth.impl
Class StaticRolesMapper
- java.lang.Object
-
- org.h2.security.auth.impl.StaticRolesMapper
-
- All Implemented Interfaces:
UserToRolesMapper,Configurable
public class StaticRolesMapper extends java.lang.Object implements UserToRolesMapper
Assign static roles to authenticated usersConfiguration parameters:
- roles role list separated by comma
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<java.lang.String>roles
-
Constructor Summary
Constructors Constructor Description StaticRolesMapper()StaticRolesMapper(java.lang.String... roles)
-
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
-
-