Top Description Fields Constructors Methods
org.h2.security.auth.impl

public Class StaticRolesMapper

extends Object
implements UserToRolesMapper
Class Inheritance
All Implemented Interfaces
org.h2.api.UserToRolesMapper, org.h2.security.auth.Configurable
Imports
java.util.Arrays, .Collection, .HashSet, org.h2.api.UserToRolesMapper, org.h2.security.auth.AuthenticationException, .AuthenticationInfo, .ConfigProperties

Assign static roles to authenticated users

Configuration parameters:

Field Summary

Modifier and TypeField and Description
private Collection<String>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
configure(ConfigProperties
= configuration properties
configProperties
)

Implements org.h2.security.auth.Configurable.configure.

configure the component

public Collection<String>
mapUserToRoles(AuthenticationInfo
authentication information
authenticationInfo
)

Implements org.h2.api.UserToRolesMapper.mapUserToRoles.

Map user identified by authentication info to a set of granted roles.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rolesback to summary
private Collection<String> roles

Constructor Detail

StaticRolesMapperback to summary
public StaticRolesMapper()
StaticRolesMapperback to summary
public StaticRolesMapper(String... roles)

Method Detail

configureback to summary
public void configure(ConfigProperties configProperties)

Implements org.h2.security.auth.Configurable.configure.

Doc from org.h2.security.auth.Configurable.configure.

configure the component

Parameters
configProperties:ConfigProperties

= configuration properties

Annotations
@Override
mapUserToRolesback to summary
public Collection<String> mapUserToRoles(AuthenticationInfo authenticationInfo) throws AuthenticationException

Implements org.h2.api.UserToRolesMapper.mapUserToRoles.

Doc from org.h2.api.UserToRolesMapper.mapUserToRoles.

Map user identified by authentication info to a set of granted roles.

Parameters
authenticationInfo:AuthenticationInfo

authentication information

Returns:Collection<String>

list of roles to be assigned to the user temporary

Annotations
@Override
Exceptions
AuthenticationException:
on authentication exception