Package org.h2.security.auth
Class H2AuthConfig
- java.lang.Object
-
- org.h2.security.auth.H2AuthConfig
-
public class H2AuthConfig extends java.lang.ObjectDescribe configuration of H2 DefaultAuthenticator.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanallowUserRegistrationprivate booleancreateMissingRolesprivate java.util.List<RealmConfig>realmsprivate java.util.List<UserToRolesMapperConfig>userToRolesMappers
-
Constructor Summary
Constructors Constructor Description H2AuthConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<RealmConfig>getRealms()Gets configuration of authentication realms.java.util.List<UserToRolesMapperConfig>getUserToRolesMappers()Gets configuration of the mappers external users to database roles.booleanisAllowUserRegistration()Allow user registration flag.booleanisCreateMissingRoles()When set create roles not found in the database.voidsetAllowUserRegistration(boolean allowUserRegistration)voidsetCreateMissingRoles(boolean createMissingRoles)When set create roles not found in the database.voidsetRealms(java.util.List<RealmConfig> realms)Sets configuration of authentication realms.voidsetUserToRolesMappers(java.util.List<UserToRolesMapperConfig> userToRolesMappers)Sets configuration of the mappers external users to database roles.
-
-
-
Field Detail
-
allowUserRegistration
private boolean allowUserRegistration
-
createMissingRoles
private boolean createMissingRoles
-
realms
private java.util.List<RealmConfig> realms
-
userToRolesMappers
private java.util.List<UserToRolesMapperConfig> userToRolesMappers
-
-
Method Detail
-
isAllowUserRegistration
public boolean isAllowUserRegistration()
Allow user registration flag. If set totruecreates external users in the database if not present.- Returns:
truein case user registration is allowed, otherwise returnsfalse.
-
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:
trueif the flag is set, otherwise returnsfalse.
-
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 java.util.List<RealmConfig> getRealms()
Gets configuration of authentication realms.- Returns:
- configuration of authentication realms.
-
setRealms
public void setRealms(java.util.List<RealmConfig> realms)
Sets configuration of authentication realms.- Parameters:
realms- configuration of authentication realms.
-
getUserToRolesMappers
public java.util.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(java.util.List<UserToRolesMapperConfig> userToRolesMappers)
Sets configuration of the mappers external users to database roles.- Parameters:
userToRolesMappers- configuration of the mappers external users to database roles.
-
-