public abstract class AbstractSaml20ObjectBuilder extends AbstractSamlObjectBuilder
AbstractSaml20ObjectBuilder.
to build saml2 objects.configBean, DEFAULT_ELEMENT_LOCAL_NAME_FIELD, DEFAULT_ELEMENT_NAME_FIELD| Constructor and Description |
|---|
AbstractSaml20ObjectBuilder(org.apereo.cas.support.saml.OpenSamlConfigBean configBean) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeValuesToSaml2Attribute(java.lang.String attributeName,
java.lang.Object attributeValue,
java.util.List<org.opensaml.core.xml.XMLObject> attributeList)
Add saml2 attribute values for attribute.
|
java.lang.String |
decodeSamlAuthnRequest(java.lang.String encodedRequestXmlString)
Decode authn request xml.
|
java.lang.String |
generateSecureRandomId()
Generate a secure random id.
|
org.opensaml.saml.saml2.core.NameID |
getNameID(java.lang.String nameIdFormat,
java.lang.String nameIdValue)
Gets name id.
|
org.opensaml.saml.saml2.core.Assertion |
newAssertion(org.opensaml.saml.saml2.core.AuthnStatement authnStatement,
java.lang.String issuer,
java.time.ZonedDateTime issuedAt,
java.lang.String id)
Create a new SAML1 response object.
|
org.opensaml.saml.saml2.core.Assertion |
newAssertion(java.util.List<org.opensaml.saml.saml2.core.Statement> authnStatement,
java.lang.String issuer,
java.time.ZonedDateTime issuedAt,
java.lang.String id)
Create a new SAML1 response object.
|
protected org.opensaml.saml.saml2.core.Attribute |
newAttribute(boolean setFriendlyName,
java.util.Map.Entry<java.lang.String,java.lang.Object> e,
java.util.Map<java.lang.String,java.lang.String> configuredNameFormats,
java.lang.String defaultNameFormat)
New attribute.
|
org.opensaml.saml.saml2.core.AttributeStatement |
newAttributeStatement(java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean setFriendlyName,
java.util.Map<java.lang.String,java.lang.String> configuredNameFormats,
java.lang.String defaultNameFormat)
New attribute statement.
|
org.opensaml.saml.saml2.core.AuthnStatement |
newAuthnStatement(java.lang.String contextClassRef,
java.time.ZonedDateTime authnInstant,
java.lang.String sessionIndex)
New authn statement.
|
org.opensaml.saml.saml2.core.Conditions |
newConditions(java.time.ZonedDateTime notBefore,
java.time.ZonedDateTime notOnOrAfter,
java.lang.String audienceUri)
New conditions element.
|
org.opensaml.saml.saml2.ecp.Response |
newEcpResponse(java.lang.String assertionConsumerUrl)
Create a new SAML ECP response object.
|
org.opensaml.saml.saml2.core.Issuer |
newIssuer(java.lang.String issuerValue)
New issuer.
|
org.opensaml.saml.saml2.core.Response |
newResponse(java.lang.String id,
java.time.ZonedDateTime issueInstant,
java.lang.String recipient,
org.apereo.cas.authentication.principal.WebApplicationService service)
Create a new SAML response object.
|
org.opensaml.saml.saml2.core.Status |
newStatus(java.lang.String codeValue,
java.lang.String statusMessage)
Create a new SAML status object.
|
org.opensaml.saml.saml2.core.Subject |
newSubject(org.opensaml.saml.saml2.core.NameID nameId,
java.lang.String recipient,
java.time.ZonedDateTime notOnOrAfter,
java.lang.String inResponseTo,
java.time.ZonedDateTime notBefore)
New subject element.
|
org.opensaml.saml.saml2.core.Subject |
newSubject(java.lang.String nameIdFormat,
java.lang.String nameIdValue,
java.lang.String recipient,
java.time.ZonedDateTime notOnOrAfter,
java.lang.String inResponseTo,
java.time.ZonedDateTime notBefore)
New subject subject.
|
addAttributeValuesToSamlAttribute, constructDocumentFromXml, getConfigBean, getSamlObjectQName, newAttributeValue, newSamlObject, newSoapObject, signSamlResponsepublic AbstractSaml20ObjectBuilder(org.apereo.cas.support.saml.OpenSamlConfigBean configBean)
public org.opensaml.saml.saml2.core.NameID getNameID(java.lang.String nameIdFormat,
java.lang.String nameIdValue)
nameIdFormat - the name id formatnameIdValue - the name id valuepublic org.opensaml.saml.saml2.ecp.Response newEcpResponse(java.lang.String assertionConsumerUrl)
assertionConsumerUrl - the assertion consumer urlpublic org.opensaml.saml.saml2.core.Response newResponse(java.lang.String id,
java.time.ZonedDateTime issueInstant,
java.lang.String recipient,
org.apereo.cas.authentication.principal.WebApplicationService service)
id - the idissueInstant - the issue instantrecipient - the recipientservice - the servicepublic org.opensaml.saml.saml2.core.Status newStatus(java.lang.String codeValue,
java.lang.String statusMessage)
codeValue - the code valuestatusMessage - the status messagepublic org.opensaml.saml.saml2.core.Assertion newAssertion(org.opensaml.saml.saml2.core.AuthnStatement authnStatement,
java.lang.String issuer,
java.time.ZonedDateTime issuedAt,
java.lang.String id)
authnStatement - the authn statementissuer - the issuerissuedAt - the issued atid - the idpublic org.opensaml.saml.saml2.core.Assertion newAssertion(java.util.List<org.opensaml.saml.saml2.core.Statement> authnStatement,
java.lang.String issuer,
java.time.ZonedDateTime issuedAt,
java.lang.String id)
authnStatement - the authn statementissuer - the issuerissuedAt - the issued atid - the idpublic org.opensaml.saml.saml2.core.Issuer newIssuer(java.lang.String issuerValue)
issuerValue - the issuerpublic org.opensaml.saml.saml2.core.AttributeStatement newAttributeStatement(java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean setFriendlyName,
java.util.Map<java.lang.String,java.lang.String> configuredNameFormats,
java.lang.String defaultNameFormat)
attributes - the attributessetFriendlyName - the set friendly nameconfiguredNameFormats - the configured name formatsdefaultNameFormat - the default name formatpublic void addAttributeValuesToSaml2Attribute(java.lang.String attributeName,
java.lang.Object attributeValue,
java.util.List<org.opensaml.core.xml.XMLObject> attributeList)
attributeName - the attribute nameattributeValue - the attribute valueattributeList - the attribute listprotected org.opensaml.saml.saml2.core.Attribute newAttribute(boolean setFriendlyName,
java.util.Map.Entry<java.lang.String,java.lang.Object> e,
java.util.Map<java.lang.String,java.lang.String> configuredNameFormats,
java.lang.String defaultNameFormat)
setFriendlyName - the set friendly namee - the entry to process and turn into a saml attributeconfiguredNameFormats - the configured name formats. If an attribute is found in this
collection, the linked name format will be used.defaultNameFormat - the default name formatpublic org.opensaml.saml.saml2.core.AuthnStatement newAuthnStatement(java.lang.String contextClassRef,
java.time.ZonedDateTime authnInstant,
java.lang.String sessionIndex)
contextClassRef - the context class ref such as AuthnContext.PASSWORD_AUTHN_CTXauthnInstant - the authn instantsessionIndex - the session indexpublic org.opensaml.saml.saml2.core.Conditions newConditions(java.time.ZonedDateTime notBefore,
java.time.ZonedDateTime notOnOrAfter,
java.lang.String audienceUri)
notBefore - the not beforenotOnOrAfter - the not on or afteraudienceUri - the service idpublic org.opensaml.saml.saml2.core.Subject newSubject(java.lang.String nameIdFormat,
java.lang.String nameIdValue,
java.lang.String recipient,
java.time.ZonedDateTime notOnOrAfter,
java.lang.String inResponseTo,
java.time.ZonedDateTime notBefore)
nameIdFormat - the name id formatnameIdValue - the name id valuerecipient - the recipientnotOnOrAfter - the not on or afterinResponseTo - the in response tonotBefore - the not beforepublic org.opensaml.saml.saml2.core.Subject newSubject(org.opensaml.saml.saml2.core.NameID nameId,
java.lang.String recipient,
java.time.ZonedDateTime notOnOrAfter,
java.lang.String inResponseTo,
java.time.ZonedDateTime notBefore)
nameId - the nameIdrecipient - the recipientnotOnOrAfter - the not on or afterinResponseTo - the in response tonotBefore - the not beforepublic java.lang.String generateSecureRandomId()
AbstractSamlObjectBuildergenerateSecureRandomId in class AbstractSamlObjectBuilderpublic java.lang.String decodeSamlAuthnRequest(java.lang.String encodedRequestXmlString)
encodedRequestXmlString - the encoded request xml string