Class SamlProfileSamlNameIdBuilder
java.lang.Object
org.apereo.cas.support.saml.util.AbstractSamlObjectBuilder
org.apereo.cas.support.saml.util.AbstractSaml20ObjectBuilder
org.apereo.cas.support.saml.web.idp.profile.builders.nameid.SamlProfileSamlNameIdBuilder
- All Implemented Interfaces:
Serializable,org.apereo.cas.support.saml.util.Saml20ObjectBuilder,SamlProfileObjectBuilder<org.opensaml.saml.common.SAMLObject>
public class SamlProfileSamlNameIdBuilder
extends org.apereo.cas.support.saml.util.AbstractSaml20ObjectBuilder
implements SamlProfileObjectBuilder<org.opensaml.saml.common.SAMLObject>
This is
SamlProfileSamlNameIdBuilder.- Since:
- 5.0.0
- See Also:
-
Field Summary
Fields inherited from class org.apereo.cas.support.saml.util.AbstractSamlObjectBuilder
DEFAULT_ELEMENT_LOCAL_NAME_FIELD, openSamlConfigBean -
Constructor Summary
ConstructorsConstructorDescriptionSamlProfileSamlNameIdBuilder(org.apereo.cas.support.saml.OpenSamlConfigBean configBean, org.apereo.cas.authentication.principal.PersistentIdGenerator persistentIdGenerator, org.opensaml.saml.metadata.resolver.MetadataResolver samlIdPMetadataResolver, SamlIdPObjectEncrypter samlIdPObjectEncrypter) -
Method Summary
Modifier and TypeMethodDescriptionorg.opensaml.saml.common.SAMLObjectbuild(SamlProfileBuilderContext context) Build.protected org.opensaml.saml.saml2.core.NameIDbuildNameId(SamlProfileBuilderContext context) Build name id.protected org.opensaml.saml.saml2.core.NameIDdetermineNameId(List<String> supportedNameFormats, SamlProfileBuilderContext context) Determine name id name id.protected org.opensaml.saml.saml2.core.NameIDencodeNameIdBasedOnNameFormat(SamlProfileBuilderContext context, String nameFormat) protected org.opensaml.saml.saml2.core.NameIDfinalizeNameId(org.opensaml.saml.saml2.core.NameID nameid, SamlProfileBuilderContext context) protected static Stringprotected StringprepareNameIdAttribute(SamlProfileBuilderContext context, String nameFormat) Prepare name id attribute idp attribute.protected voidvalidateRequiredNameIdFormatIfAny(List<String> supportedNameFormats, String requiredNameFormat, SamlProfileBuilderContext context) Methods inherited from class org.apereo.cas.support.saml.util.AbstractSaml20ObjectBuilder
addAttributeValuesToSaml2Attribute, decodeSamlAuthnRequest, generateSecureRandomId, getNameID, inflateAuthnRequest, newAssertion, newAssertion, newAttribute, newAuthnStatement, newAuthnStatement, newConditions, newEcpResponse, newIssuer, newLogoutRequest, newLogoutResponse, newResponse, newSamlObject, newStatus, newSubject, newSubjectMethods inherited from class org.apereo.cas.support.saml.util.AbstractSamlObjectBuilder
addAttributeValuesToSamlAttribute, constructDocumentFromXml, getOpenSamlConfigBean, newAttributeValue, signSamlResponseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apereo.cas.support.saml.util.Saml20ObjectBuilder
getSamlObjectQName, newSamlObject
-
Constructor Details
-
SamlProfileSamlNameIdBuilder
public SamlProfileSamlNameIdBuilder(org.apereo.cas.support.saml.OpenSamlConfigBean configBean, org.apereo.cas.authentication.principal.PersistentIdGenerator persistentIdGenerator, org.opensaml.saml.metadata.resolver.MetadataResolver samlIdPMetadataResolver, SamlIdPObjectEncrypter samlIdPObjectEncrypter)
-
-
Method Details
-
getSupportedNameIdFormats
-
getRequiredNameIdFormatIfAny
-
build
public org.opensaml.saml.common.SAMLObject build(SamlProfileBuilderContext context) throws org.apereo.cas.support.saml.SamlException Description copied from interface:SamlProfileObjectBuilderBuild.- Specified by:
buildin interfaceSamlProfileObjectBuilder<org.opensaml.saml.common.SAMLObject>- Parameters:
context- the context- Returns:
- the response
- Throws:
org.apereo.cas.support.saml.SamlException
-
buildNameId
protected org.opensaml.saml.saml2.core.NameID buildNameId(SamlProfileBuilderContext context) throws org.apereo.cas.support.saml.SamlException Build name id. If there are no explicitly defined NameIDFormats, include the default format. see: here.- Parameters:
context- the context- Returns:
- the name id
- Throws:
org.apereo.cas.support.saml.SamlException- the saml exception
-
finalizeNameId
protected org.opensaml.saml.saml2.core.NameID finalizeNameId(org.opensaml.saml.saml2.core.NameID nameid, SamlProfileBuilderContext context) -
validateRequiredNameIdFormatIfAny
protected void validateRequiredNameIdFormatIfAny(List<String> supportedNameFormats, String requiredNameFormat, SamlProfileBuilderContext context) -
determineNameId
protected org.opensaml.saml.saml2.core.NameID determineNameId(List<String> supportedNameFormats, SamlProfileBuilderContext context) Determine name id name id.- Parameters:
supportedNameFormats- the supported name formatscontext- the context- Returns:
- the name id
-
encodeNameIdBasedOnNameFormat
protected org.opensaml.saml.saml2.core.NameID encodeNameIdBasedOnNameFormat(SamlProfileBuilderContext context, String nameFormat) -
prepareNameIdAttribute
Prepare name id attribute idp attribute.- Parameters:
context- the contextnameFormat- the name format- Returns:
- the idp attribute
-