Class RequestedAttribute
java.lang.Object
se.swedenconnect.spring.saml.idp.attributes.UserAttribute
se.swedenconnect.spring.saml.idp.attributes.RequestedAttribute
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ImplicitRequestedAttribute
A representation of a "requested attribute".
- Author:
- Martin Lindström
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class se.swedenconnect.spring.saml.idp.attributes.UserAttribute
UserAttribute.UnknownAttributeValue -
Field Summary
Fields inherited from class se.swedenconnect.spring.saml.idp.attributes.UserAttribute
DEFAULT_NAME_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.RequestedAttribute(String id, String friendlyName) Constructor.RequestedAttribute(String id, String friendlyName, boolean isRequired) Constructor.RequestedAttribute(RequestedAttribute attribute) Constructor creating anRequestedAttributefrom an OpenSAML SAML metadataRequestedAttribute.RequestedAttribute(RequestedAttribute attribute) Constructor creating anRequestedAttributefrom an OpenSAML eIDASRequestedAttribute. -
Method Summary
Modifier and TypeMethodDescriptionbooleanPredicate telling whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion.voidsetRequired(boolean isRequired) Assigns whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion.toString()Methods inherited from class se.swedenconnect.spring.saml.idp.attributes.UserAttribute
getFriendlyName, getId, getNameFormat, getStringValues, getValues, setFriendlyName, setNameFormat, setValue, setValues, toOpenSamlAttribute, valuesToString
-
Constructor Details
-
RequestedAttribute
Constructor.- Parameters:
id- the attribute ID (name)
-
RequestedAttribute
Constructor.- Parameters:
id- the attribute ID (name)friendlyName- the attribute friendly name
-
RequestedAttribute
Constructor.- Parameters:
id- the attribute ID (name)friendlyName- the attribute friendly nameisRequired- whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion
-
RequestedAttribute
Constructor creating anRequestedAttributefrom an OpenSAML eIDASRequestedAttribute.- Parameters:
attribute- the eIDASRequestedAttribute
-
RequestedAttribute
Constructor creating anRequestedAttributefrom an OpenSAML SAML metadataRequestedAttribute.- Parameters:
attribute- theRequestedAttribute
-
-
Method Details
-
isRequired
public boolean isRequired()Predicate telling whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion.- Returns:
trueif the attribute is required andfalseotherwise
-
setRequired
public void setRequired(boolean isRequired) Assigns whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion.- Parameters:
isRequired- the is-required flag
-
toString
- Overrides:
toStringin classUserAttribute
-