提交 72e7f15f authored 作者: mysinmyc's avatar mysinmyc

private modifier

上级 316b5a95
......@@ -13,11 +13,11 @@ import org.h2.util.StringUtils;
*/
public class AuthenticationInfo {
ConnectionInfo connectionInfo;
private ConnectionInfo connectionInfo;
String password;
private String password;
String realm;
private String realm;
/*
* Can be used by authenticator to hold informations
......
......@@ -17,7 +17,7 @@ import org.h2.util.Utils;
*/
public class ConfigProperties {
Map<String, String> properties;
private Map<String, String> properties;
public ConfigProperties() {
properties = new HashMap<>();
......
......@@ -52,19 +52,19 @@ public class DefaultAuthenticator implements Authenticator {
public static final String DEFAULT_REALMNAME = "H2";
Map<String, CredentialsValidator> realms = new HashMap<>();
private Map<String, CredentialsValidator> realms = new HashMap<>();
List<UserToRolesMapper> userToRolesMappers = new ArrayList<>();
private List<UserToRolesMapper> userToRolesMappers = new ArrayList<>();
boolean allowUserRegistration;
private boolean allowUserRegistration;
boolean persistUsers;
private boolean persistUsers;
boolean createMissingRoles;
private boolean createMissingRoles;
boolean skipDefaultInitialization;
private boolean skipDefaultInitialization;
boolean initialized;
private boolean initialized;
private static final DefaultAuthenticator INSTANCE = new DefaultAuthenticator();
......
......@@ -22,7 +22,7 @@ import javax.xml.bind.annotation.XmlRootElement;
public class H2AuthConfig {
@XmlAttribute
boolean allowUserRegistration=true;
private boolean allowUserRegistration=true;
public boolean isAllowUserRegistration() {
return allowUserRegistration;
......
......@@ -16,10 +16,10 @@ import javax.xml.bind.annotation.XmlAttribute;
public class PropertyConfig {
@XmlAttribute(required = true)
String name;
private String name;
@XmlAttribute
String value;
private String value;
public PropertyConfig() {
}
......
......@@ -17,7 +17,7 @@ import javax.xml.bind.annotation.XmlElement;
public class RealmConfig {
@XmlAttribute(required = true)
String name;
private String name;
public String getName() {
return name;
......
......@@ -17,10 +17,10 @@ import javax.xml.bind.annotation.XmlElement;
public class UserToRolesMapperConfig {
@XmlAttribute(required = true, name="class")
String className;
private String className;
@XmlElement(name = "property")
List<PropertyConfig> properties;
private List<PropertyConfig> properties;
public String getClassName() {
return className;
......
......@@ -20,7 +20,7 @@ import org.h2.security.auth.ConfigProperties;
*/
public class AssignRealmNameRole implements UserToRolesMapper{
String roleNameFormat;
private String roleNameFormat;
public AssignRealmNameRole() {
this("@%s");
......
......@@ -33,7 +33,7 @@ public class JaasCredentialsValidator implements CredentialsValidator {
public static final String DEFAULT_APPNAME="h2";
String appName;
private String appName;
public JaasCredentialsValidator() {
this(DEFAULT_APPNAME);
......
......@@ -29,11 +29,11 @@ import org.h2.security.auth.ConfigProperties;
*/
public class LdapCredentialsValidator implements CredentialsValidator {
String bindDnPattern;
String host;
int port;
boolean secure;
String url;
private String bindDnPattern;
private String host;
private int port;
private boolean secure;
private String url;
@Override
public void configure(ConfigProperties configProperties) {
......
......@@ -26,7 +26,7 @@ import org.h2.security.auth.ConfigProperties;
*/
public class StaticRolesMapper implements UserToRolesMapper {
Collection<String> roles;
private Collection<String> roles;
public StaticRolesMapper() {
}
......
......@@ -23,10 +23,10 @@ import org.h2.util.Utils;
*/
public class StaticUserCredentialsValidator implements CredentialsValidator {
Pattern userNamePattern;
String password;
byte[] salt;
byte[] hashWithSalt;
private Pattern userNamePattern;
private String password;
private byte[] salt;
private byte[] hashWithSalt;
public StaticUserCredentialsValidator() {
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论