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 users

Configuration parameters:

- roles role list separated by comma

### Constructor Summary

Constructors
Constructor and Description
`StaticRolesMapper()`
`StaticRolesMapper(java.lang.String... roles)`

### Method Summary

Methods
`void` `configure(ConfigProperties configProperties)` configure the component
`java.util.Collection<java.lang.String>` `mapUserToRoles(AuthenticationInfo authenticationInfo)` Map user identified by authentication info to a set of granted roles.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### StaticRolesMapper

    public StaticRolesMapper()

#### StaticRolesMapper

    public StaticRolesMapper(java.lang.String... roles)

### Method Detail

#### configure

    public void configure(ConfigProperties configProperties)

Description copied from interface: `Configurable`
configure the component

Specified by:
  `configure` in interface `Configurable`
Parameters:
  `configProperties` - = configuration properties

#### mapUserToRoles

    public java.util.Collection<java.lang.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 interface `UserToRolesMapper`
Parameters:
  `authenticationInfo` - authentication information
Returns:
  list of roles to be assigned to the user temporary
Throws:
  `AuthenticationException` - on authentication exception