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

private modifier

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