Package org.h2.security.auth

# Class H2AuthConfig

java.lang.Object
org.h2.security.auth.H2AuthConfig

public class H2AuthConfig extends Object
Describe configuration of H2 DefaultAuthenticator.

## Constructor Summary

Constructors
Constructor
Description
`H2AuthConfig()`

## Method Summary

Modifier and Type
Method
Description
`List<RealmConfig>`
`getRealms()`
Gets configuration of authentication realms.
`List<UserToRolesMapperConfig>`
`getUserToRolesMappers()`
Gets configuration of the mappers external users to database roles.
`boolean`
`isAllowUserRegistration()`
Allow user registration flag.
`boolean`
`isCreateMissingRoles()`
When set create roles not found in the database.
`void`
`setAllowUserRegistration(boolean allowUserRegistration)`
`void`
`setCreateMissingRoles(boolean createMissingRoles)`
When set create roles not found in the database.
`void`
`setRealms(List<RealmConfig> realms)`
Sets configuration of authentication realms.
`void`
`setUserToRolesMappers(List<UserToRolesMapperConfig> userToRolesMappers)`
Sets configuration of the mappers external users to database roles.

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

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

## Constructor Details

### H2AuthConfig

public H2AuthConfig()

## Method Details

### isAllowUserRegistration

public boolean isAllowUserRegistration()
Allow user registration flag. If set to `true` creates external users in the database if not present.

Returns:
  `true` in case user registration is allowed, otherwise returns `false`.

### setAllowUserRegistration

public void setAllowUserRegistration(boolean allowUserRegistration)

Parameters:
  `allowUserRegistration` - Allow user registration flag.

### isCreateMissingRoles

public boolean isCreateMissingRoles()
When set create roles not found in the database. If not set roles not found in the database are silently skipped.

Returns:
  `true` if the flag is set, otherwise returns `false`.

### setCreateMissingRoles

public void setCreateMissingRoles(boolean createMissingRoles)
When set create roles not found in the database. If not set roles not found in the database are silently skipped

Parameters:
  `createMissingRoles` - missing roles flag.

### getRealms

public List<RealmConfig> getRealms()
Gets configuration of authentication realms.

Returns:
  configuration of authentication realms.

### setRealms

public void setRealms(List<RealmConfig> realms)
Sets configuration of authentication realms.

Parameters:
  `realms` - configuration of authentication realms.

### getUserToRolesMappers

public List<UserToRolesMapperConfig> getUserToRolesMappers()
Gets configuration of the mappers external users to database roles.

Returns:
  configuration of the mappers external users to database roles.

### setUserToRolesMappers

public void setUserToRolesMappers(List<UserToRolesMapperConfig> userToRolesMappers)
Sets configuration of the mappers external users to database roles.

Parameters:
  `userToRolesMappers` - configuration of the mappers external users to database roles.