Class SamlFactory
java.lang.Object
swiss.trustbroker.common.saml.util.SamlFactory
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionattributeValueToStrings(List<org.opensaml.core.xml.XMLObject> attributeValues) static org.opensaml.saml.saml2.core.ArtifactcreateArtifact(String artifactId) static org.opensaml.saml.saml2.core.ArtifactResolvecreateArtifactResolve(org.opensaml.saml.saml2.core.Artifact artifact, String issuer, String destination) static org.opensaml.saml.saml2.core.ArtifactResponsecreateArtifactResponse(org.opensaml.saml.saml2.core.ArtifactResolve artifactResolve, Optional<org.opensaml.saml.common.SAMLObject> message, String issuer) static org.opensaml.saml.saml2.core.AttributecreateAttribute(String nameUri, String value, String attrOriginIssuer) static org.opensaml.saml.saml2.core.AttributecreateAttribute(String nameUri, List<String> values, String attrOriginIssuer) static org.opensaml.saml.saml2.core.AttributeStatementcreateAttributeStatement(Collection<org.opensaml.saml.saml2.core.Attribute> attributes) static org.opensaml.saml.saml2.core.AuthnContextClassRefcreateAuthnClassRef(String classRef) static org.opensaml.saml.saml2.core.AuthnContextcreateAuthnContext(String classRef) static List<org.opensaml.saml.saml2.core.AuthnStatement> createAuthnStatements(List<String> classRefs, String sessionIndex, Instant sessionNotOnOrAfter, Instant authnInstant) static org.opensaml.saml.saml2.core.ConditionscreateConditions(String audience, long validitySeconds, Instant now) static org.opensaml.saml.saml2.core.IssuercreateIssuer(String spEntity) static org.opensaml.xmlsec.signature.KeyInfocreateKeyInfo(org.opensaml.security.credential.Credential credential) static org.opensaml.saml.saml2.core.LogoutRequestcreateLogoutRequest(String issuer, String destination, org.opensaml.saml.saml2.core.NameID nameId) static org.opensaml.saml.saml2.core.NameIDcreateNameId(String nameId, String nameIdFormat, String nameQualifier) static org.opensaml.saml.saml2.core.NameIDPolicycreateNameIdPolicy(String nameIdFormat) static <T extends org.opensaml.saml.saml2.core.RequestAbstractType>
TcreateRequest(Class<T> requestClass, String issuer) static org.opensaml.saml.saml2.core.RequestedAuthnContextcreateRequestedAuthnContext(Collection<String> contextClasses, String comparison) static <T extends org.opensaml.saml.saml2.core.StatusResponseType>
TcreateResponse(Class<T> responseClass, String issuer) static org.opensaml.saml.saml2.core.AttributecreateResponseAttribute(String name, List<String> values) static org.opensaml.saml.saml2.core.StatuscreateResponseStatus(String statusCodeValue) static org.opensaml.saml.saml2.core.StatuscreateResponseStatus(String statusCodeValue, String message, String nestedStatusCodeValue) static org.opensaml.saml.saml2.core.ScopingcreateScoping(String requestorId) static voidcreateSignatureReference(org.opensaml.saml.common.SignableSAMLObject xmlObject, org.opensaml.xmlsec.signature.Signature signature, String digestMethod) static org.opensaml.saml.saml2.core.SubjectcreateSubject(org.opensaml.saml.saml2.core.NameID nameId, String authnRequest, String recipient, long validitySeconds, Instant now) static org.opensaml.xmlsec.signature.X509DatacreateX509Certificate(org.opensaml.security.credential.Credential credential) static List<org.opensaml.saml.saml2.core.Attribute> filterDuplicatedAttributes(Collection<org.opensaml.saml.saml2.core.Attribute> attributes) static org.opensaml.xmlsec.keyinfo.KeyInfoGeneratorFactorygetKeyInfoGeneratorFactory(org.opensaml.security.credential.Credential credential, boolean emitSki) static org.opensaml.xmlsec.signature.SignatureprepareSignableObject(org.opensaml.saml.common.SignableSAMLObject xmlObject, org.opensaml.security.credential.Credential credential, String signatureMethodAlgorithm, String canonicalizationAlgo, String digestMethod) static org.opensaml.xmlsec.signature.SignatureprepareSignableObject(org.opensaml.saml.common.SignableSAMLObject xmlObject, SignatureParameters signatureParameters) static StringreplaceClientNameInUri(String nameURI, String clientName) static voidsignAssertion(org.opensaml.saml.saml2.core.Assertion assertion, SignatureParameters signatureParameters) static voidsignSignableObject(org.opensaml.saml.common.SignableSAMLObject signableSAMLObject, SignatureParameters signatureParameters)
-
Field Details
-
XML_SEC_DIGEST_METHOD_SHA256
- See Also:
-
XML_SEC_DIGEST_METHOD_SHA1
- See Also:
-
XML_SEC_DIGEST_METHOD_DEFAULT
- See Also:
-
CLIENT_NAME_TAG
- See Also:
-
-
Method Details
-
filterDuplicatedAttributes
public static List<org.opensaml.saml.saml2.core.Attribute> filterDuplicatedAttributes(Collection<org.opensaml.saml.saml2.core.Attribute> attributes) -
signAssertion
public static void signAssertion(org.opensaml.saml.saml2.core.Assertion assertion, SignatureParameters signatureParameters) -
attributeValueToStrings
-
createRequestedAuthnContext
public static org.opensaml.saml.saml2.core.RequestedAuthnContext createRequestedAuthnContext(Collection<String> contextClasses, String comparison) -
createAuthnStatements
-
createAuthnContext
-
createAuthnClassRef
public static org.opensaml.saml.saml2.core.AuthnContextClassRef createAuthnClassRef(String classRef) -
createAttributeStatement
public static org.opensaml.saml.saml2.core.AttributeStatement createAttributeStatement(Collection<org.opensaml.saml.saml2.core.Attribute> attributes) -
createAttribute
-
createAttribute
-
createResponseAttribute
-
createConditions
-
createSubject
-
createNameId
-
createResponseStatus
-
createResponseStatus
-
createSignatureReference
public static void createSignatureReference(org.opensaml.saml.common.SignableSAMLObject xmlObject, org.opensaml.xmlsec.signature.Signature signature, String digestMethod) -
prepareSignableObject
public static org.opensaml.xmlsec.signature.Signature prepareSignableObject(org.opensaml.saml.common.SignableSAMLObject xmlObject, SignatureParameters signatureParameters) -
prepareSignableObject
-
createKeyInfo
public static org.opensaml.xmlsec.signature.KeyInfo createKeyInfo(org.opensaml.security.credential.Credential credential) -
getKeyInfoGeneratorFactory
public static org.opensaml.xmlsec.keyinfo.KeyInfoGeneratorFactory getKeyInfoGeneratorFactory(org.opensaml.security.credential.Credential credential, boolean emitSki) -
createIssuer
-
createNameIdPolicy
-
createScoping
-
createX509Certificate
public static org.opensaml.xmlsec.signature.X509Data createX509Certificate(org.opensaml.security.credential.Credential credential) -
replaceClientNameInUri
-
createResponse
-
createRequest
-
createLogoutRequest
-
signSignableObject
public static void signSignableObject(org.opensaml.saml.common.SignableSAMLObject signableSAMLObject, SignatureParameters signatureParameters) -
createArtifactResponse
-
createArtifactResolve
-
createArtifact
-