use of uk.gov.ida.saml.hub.domain.UserAccountCreationAttribute in project verify-hub by alphagov.
the class AttributeQueryAttributeFactoryTest method createAttribute_shouldPopulateAttributeNameFromUserAccountCreationAttributeValue.
@Test
public void createAttribute_shouldPopulateAttributeNameFromUserAccountCreationAttributeValue() {
UserAccountCreationAttribute userAccountCreationAttribute = UserAccountCreationAttribute.CURRENT_ADDRESS;
Attribute attribute = attributeQueryAttributeFactory.createAttribute(userAccountCreationAttribute);
assertThat(attribute.getName()).isEqualTo("currentaddress");
}
use of uk.gov.ida.saml.hub.domain.UserAccountCreationAttribute in project verify-hub by alphagov.
the class AttributeQueryAttributeFactoryTest method createAttribute_shouldPopulateAttributeNameFormatWithUnspecifiedFormat.
@Test
public void createAttribute_shouldPopulateAttributeNameFormatWithUnspecifiedFormat() {
UserAccountCreationAttribute userAccountCreationAttribute = UserAccountCreationAttribute.CURRENT_ADDRESS;
Attribute attribute = attributeQueryAttributeFactory.createAttribute(userAccountCreationAttribute);
assertThat(attribute.getNameFormat()).isEqualTo("urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified");
}
use of uk.gov.ida.saml.hub.domain.UserAccountCreationAttribute in project verify-hub by alphagov.
the class AttributeQueryAttributeFactoryTest method createAttribute_shouldNotSetFriendlyName.
@Test
public void createAttribute_shouldNotSetFriendlyName() {
UserAccountCreationAttribute userAccountCreationAttribute = UserAccountCreationAttribute.CURRENT_ADDRESS;
Attribute attribute = attributeQueryAttributeFactory.createAttribute(userAccountCreationAttribute);
assertThat(attribute.getFriendlyName()).isNull();
}
use of uk.gov.ida.saml.hub.domain.UserAccountCreationAttribute in project verify-hub by alphagov.
the class AttributeQueryAttributeFactory method createAttribute.
public Attribute createAttribute(final UserAccountCreationAttribute userAccountCreationAttribute) {
final Attribute attribute = openSamlXmlObjectFactory.createAttribute();
attribute.setName(userAccountCreationAttribute.getAttributeName());
attribute.setNameFormat(Attribute.UNSPECIFIED);
return attribute;
}
Aggregations