From d55e52170162fbe82428d4c67333661ed71da7ab Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Tue, 2 Feb 2016 17:32:10 +0100 Subject: [PATCH] fixing security properties for anonymous enabled, adding javadoc Signed-off-by: Michael Hirsch --- .../hawkbit/security/SecurityProperties.java | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityProperties.java b/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityProperties.java index d3c426977..8cc056f15 100644 --- a/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityProperties.java +++ b/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityProperties.java @@ -23,6 +23,9 @@ import org.springframework.stereotype.Component; @ConfigurationProperties public class SecurityProperties { + /** + * Inner class for reverse proxy configuration. + */ @Component @ConfigurationProperties("hawkbit.server.controller.security.rp") public static class RpProperties { @@ -77,24 +80,27 @@ public class SecurityProperties { } + /** + * Inner class for anonymous enable configuration. + */ @Component - @ConfigurationProperties("hawkbit.server.controller.security.authentication") - public static class AuthenticationsProperties { - private Boolean anonymousEnabled = Boolean.FALSE; + @ConfigurationProperties("hawkbit.server.controller.security.authentication.anonymous") + public static class AnoymousAuthenticationProperties { + private Boolean enabled = Boolean.FALSE; /** - * @param anonymousEnabled - * the anonymousEnabled to set + * @param enabled + * the enabled to set */ - public void setAnonymousEnabled(final Boolean anonymousEnabled) { - this.anonymousEnabled = anonymousEnabled; + public void setEnabled(final Boolean enabled) { + this.enabled = enabled; } /** - * @return the anonymousEnabled + * @return the enabled */ - public Boolean getAnonymousEnabled() { - return anonymousEnabled; + public Boolean getEnabled() { + return enabled; } } @@ -103,7 +109,7 @@ public class SecurityProperties { private RpProperties rppProperties; @Autowired - private AuthenticationsProperties authenticationsProperties; + private AnoymousAuthenticationProperties authenticationsProperties; public String getRpCnHeader() { return rppProperties.getCnHeader(); @@ -118,7 +124,7 @@ public class SecurityProperties { } public Boolean getAnonymousEnabled() { - return authenticationsProperties.getAnonymousEnabled(); + return authenticationsProperties.getEnabled(); } }