fixing security properties for anonymous enabled, adding javadoc

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
Michael Hirsch
2016-02-02 17:32:10 +01:00
parent 877cb1ee24
commit d55e521701

View File

@@ -23,6 +23,9 @@ import org.springframework.stereotype.Component;
@ConfigurationProperties @ConfigurationProperties
public class SecurityProperties { public class SecurityProperties {
/**
* Inner class for reverse proxy configuration.
*/
@Component @Component
@ConfigurationProperties("hawkbit.server.controller.security.rp") @ConfigurationProperties("hawkbit.server.controller.security.rp")
public static class RpProperties { public static class RpProperties {
@@ -77,24 +80,27 @@ public class SecurityProperties {
} }
/**
* Inner class for anonymous enable configuration.
*/
@Component @Component
@ConfigurationProperties("hawkbit.server.controller.security.authentication") @ConfigurationProperties("hawkbit.server.controller.security.authentication.anonymous")
public static class AuthenticationsProperties { public static class AnoymousAuthenticationProperties {
private Boolean anonymousEnabled = Boolean.FALSE; private Boolean enabled = Boolean.FALSE;
/** /**
* @param anonymousEnabled * @param enabled
* the anonymousEnabled to set * the enabled to set
*/ */
public void setAnonymousEnabled(final Boolean anonymousEnabled) { public void setEnabled(final Boolean enabled) {
this.anonymousEnabled = anonymousEnabled; this.enabled = enabled;
} }
/** /**
* @return the anonymousEnabled * @return the enabled
*/ */
public Boolean getAnonymousEnabled() { public Boolean getEnabled() {
return anonymousEnabled; return enabled;
} }
} }
@@ -103,7 +109,7 @@ public class SecurityProperties {
private RpProperties rppProperties; private RpProperties rppProperties;
@Autowired @Autowired
private AuthenticationsProperties authenticationsProperties; private AnoymousAuthenticationProperties authenticationsProperties;
public String getRpCnHeader() { public String getRpCnHeader() {
return rppProperties.getCnHeader(); return rppProperties.getCnHeader();
@@ -118,7 +124,7 @@ public class SecurityProperties {
} }
public Boolean getAnonymousEnabled() { public Boolean getAnonymousEnabled() {
return authenticationsProperties.getAnonymousEnabled(); return authenticationsProperties.getEnabled();
} }
} }