uk.gov.ida.saml.hub.factories.AttributeQueryAttributeFactory Maven / Gradle / Ivy
package uk.gov.ida.saml.hub.factories;
import com.google.inject.Inject;
import org.opensaml.saml.saml2.core.Attribute;
import uk.gov.ida.saml.core.OpenSamlXmlObjectFactory;
import uk.gov.ida.saml.hub.domain.UserAccountCreationAttribute;
public class AttributeQueryAttributeFactory {
private final OpenSamlXmlObjectFactory openSamlXmlObjectFactory;
@Inject
public AttributeQueryAttributeFactory(OpenSamlXmlObjectFactory openSamlXmlObjectFactory) {
this.openSamlXmlObjectFactory = openSamlXmlObjectFactory;
}
public Attribute createAttribute(final UserAccountCreationAttribute userAccountCreationAttribute) {
final Attribute attribute = openSamlXmlObjectFactory.createAttribute();
attribute.setName(userAccountCreationAttribute.getAttributeName());
attribute.setNameFormat(Attribute.UNSPECIFIED);
return attribute;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy