Package org.h2.security.auth.impl
Class StaticRolesMapper
java.lang.Object
org.h2.security.auth.impl.StaticRolesMapper
- All Implemented Interfaces:
UserToRolesMapper,Configurable
Assign static roles to authenticated users
Configuration parameters:
- roles role list separated by comma
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(ConfigProperties configProperties) configure the componentmapUserToRoles(AuthenticationInfo authenticationInfo) Map user identified by authentication info to a set of granted roles.
-
Constructor Details
-
StaticRolesMapper
public StaticRolesMapper() -
StaticRolesMapper
-
-
Method Details
-
configure
Description copied from interface:Configurableconfigure the component- Specified by:
configurein interfaceConfigurable- Parameters:
configProperties- = configuration properties
-
mapUserToRoles
public Collection<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
-