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
ConstructorDescriptionConstructor.RequestedAttribute
(String id, String friendlyName) Constructor.RequestedAttribute
(String id, String friendlyName, boolean isRequired) Constructor.RequestedAttribute
(org.opensaml.saml.saml2.metadata.RequestedAttribute attribute) Constructor creating anRequestedAttribute
from an OpenSAML SAML metadataRequestedAttribute
.RequestedAttribute
(RequestedAttribute attribute) Constructor creating anRequestedAttribute
from an OpenSAML eIDASRequestedAttribute
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Predicate telling whether the attribute is "required", meaning that the requester requires it to be included in a resulting assertion.void
setRequired
(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 anRequestedAttribute
from an OpenSAML eIDASRequestedAttribute
.- Parameters:
attribute
- the eIDASRequestedAttribute
-
RequestedAttribute
public RequestedAttribute(org.opensaml.saml.saml2.metadata.RequestedAttribute attribute) Constructor creating anRequestedAttribute
from 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:
true
if the attribute is required andfalse
otherwise
-
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:
toString
in classUserAttribute
-