117 lines
3.2 KiB
Java
117 lines
3.2 KiB
Java
package eu.eudat.model.persist.referencetypedefinition;
|
|
|
|
import eu.eudat.commons.enums.ReferenceTypeExternalApiHTTPMethodType;
|
|
import eu.eudat.commons.validation.BaseValidator;
|
|
import eu.eudat.commons.validation.specification.Specification;
|
|
import eu.eudat.convention.ConventionService;
|
|
import eu.eudat.errorcode.ErrorThesaurusProperties;
|
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
|
import org.springframework.context.MessageSource;
|
|
import org.springframework.context.annotation.Scope;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class AuthenticationConfigurationPersist {
|
|
|
|
private Boolean enabled;
|
|
|
|
public static final String _enabled = "enabled";
|
|
|
|
private String authUrl;
|
|
|
|
public static final String _authUrl = "authUrl";
|
|
|
|
private ReferenceTypeExternalApiHTTPMethodType authMethod;
|
|
|
|
public static final String _authMethod = "authMethod";
|
|
|
|
private String authTokenPath;
|
|
|
|
public static final String _authTokenPath = "authTokenPath";
|
|
|
|
private String authRequestBody;
|
|
|
|
public static final String _authRequestBody = "authRequestBody";
|
|
|
|
private String type;
|
|
|
|
public static final String _type = "type";
|
|
|
|
public Boolean getEnabled() {
|
|
return enabled;
|
|
}
|
|
|
|
public void setEnabled(Boolean enabled) {
|
|
this.enabled = enabled;
|
|
}
|
|
|
|
public String getAuthUrl() {
|
|
return authUrl;
|
|
}
|
|
|
|
public void setAuthUrl(String authUrl) {
|
|
this.authUrl = authUrl;
|
|
}
|
|
|
|
public ReferenceTypeExternalApiHTTPMethodType getAuthMethod() {
|
|
return authMethod;
|
|
}
|
|
|
|
public void setAuthMethod(ReferenceTypeExternalApiHTTPMethodType authMethod) {
|
|
this.authMethod = authMethod;
|
|
}
|
|
|
|
public String getAuthTokenPath() {
|
|
return authTokenPath;
|
|
}
|
|
|
|
public void setAuthTokenPath(String authTokenPath) {
|
|
this.authTokenPath = authTokenPath;
|
|
}
|
|
|
|
public String getAuthRequestBody() {
|
|
return authRequestBody;
|
|
}
|
|
|
|
public void setAuthRequestBody(String authRequestBody) {
|
|
this.authRequestBody = authRequestBody;
|
|
}
|
|
|
|
public String getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(String type) {
|
|
this.type = type;
|
|
}
|
|
|
|
@Component(AuthenticationConfigurationPersistValidator.ValidatorName)
|
|
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
|
public static class AuthenticationConfigurationPersistValidator extends BaseValidator<AuthenticationConfigurationPersist> {
|
|
|
|
public static final String ValidatorName = "AuthenticationConfigurationPersistValidator";
|
|
|
|
private final MessageSource messageSource;
|
|
|
|
protected AuthenticationConfigurationPersistValidator(ConventionService conventionService, ErrorThesaurusProperties errors, MessageSource messageSource) {
|
|
super(conventionService, errors);
|
|
this.messageSource = messageSource;
|
|
}
|
|
|
|
@Override
|
|
protected Class<AuthenticationConfigurationPersist> modelClass() {
|
|
return AuthenticationConfigurationPersist.class;
|
|
}
|
|
|
|
@Override
|
|
protected List<Specification> specifications(AuthenticationConfigurationPersist item) {
|
|
return Arrays.asList(
|
|
|
|
);
|
|
}
|
|
}
|
|
|
|
}
|