public class SamlProtocolUtils extends Object
Constructor and Description |
---|
SamlProtocolUtils() |
Modifier and Type | Method and Description |
---|---|
static ArtifactResponseType |
buildArtifactResponse(Document document)
Takes a saml document and inserts it as a body of ArtifactResponseType
|
static ArtifactResponseType |
buildArtifactResponse(SAML2Object samlObject,
NameIDType issuer)
Takes a saml object (an object that will be part of resulting ArtifactResponse), and inserts it as the body of
an ArtifactResponse.
|
static ArtifactResponseType |
buildArtifactResponse(SAML2Object samlObject,
NameIDType issuer,
URI statusCode)
Takes a saml object (an object that will be part of resulting ArtifactResponse), and inserts it as the body of
an ArtifactResponse.
|
static Document |
convert(ArtifactResponseType responseType)
Convert a SAML2 ArtifactResponse into a Document
|
static PublicKey |
getEncryptionKey(ClientModel client)
Returns public part of SAML encryption key from the client settings.
|
static PublicKey |
getPublicKey(ClientModel client,
String attribute) |
static PublicKey |
getSignatureValidationKey(ClientModel client)
Returns public part of SAML signing key from the client settings.
|
static void |
verifyDocumentSignature(ClientModel client,
Document document)
Verifies a signature of the given SAML document using settings for the given client.
|
static void |
verifyDocumentSignature(Document document,
KeyLocator keyLocator)
Verifies a signature of the given SAML document using keys obtained from the given key locator.
|
static void |
verifyRedirectSignature(SAMLDocumentHolder documentHolder,
KeyLocator locator,
javax.ws.rs.core.MultivaluedMap<String,String> encodedParams,
String paramKey) |
static void |
verifyRedirectSignature(SAMLDocumentHolder documentHolder,
KeyLocator locator,
javax.ws.rs.core.UriInfo uriInformation,
String paramKey) |
public static void verifyDocumentSignature(ClientModel client, Document document) throws VerificationException
client
- document
- VerificationException
public static void verifyDocumentSignature(Document document, KeyLocator keyLocator) throws VerificationException
document
- keyLocator
- VerificationException
public static PublicKey getSignatureValidationKey(ClientModel client) throws VerificationException
client
- VerificationException
public static PublicKey getEncryptionKey(ClientModel client) throws VerificationException
client
- VerificationException
public static PublicKey getPublicKey(ClientModel client, String attribute) throws VerificationException
VerificationException
public static void verifyRedirectSignature(SAMLDocumentHolder documentHolder, KeyLocator locator, javax.ws.rs.core.UriInfo uriInformation, String paramKey) throws VerificationException
VerificationException
public static void verifyRedirectSignature(SAMLDocumentHolder documentHolder, KeyLocator locator, javax.ws.rs.core.MultivaluedMap<String,String> encodedParams, String paramKey) throws VerificationException
VerificationException
public static ArtifactResponseType buildArtifactResponse(SAML2Object samlObject, NameIDType issuer, URI statusCode) throws ConfigurationException, ProcessingException
samlObject
- a Saml objectissuer
- issuer of the resulting ArtifactResponse, should be the same as issuer of the samlObjectstatusCode
- status code of the resulting responseConfigurationException
ProcessingException
public static ArtifactResponseType buildArtifactResponse(SAML2Object samlObject, NameIDType issuer) throws ConfigurationException, ProcessingException
samlObject
- a Saml objectissuer
- issuer of the resulting ArtifactResponse, should be the same as issuer of the samlObjectConfigurationException
ProcessingException
public static ArtifactResponseType buildArtifactResponse(Document document) throws ParsingException, ProcessingException, ConfigurationException
document
- the documentParsingException
ProcessingException
ConfigurationException
public static Document convert(ArtifactResponseType responseType) throws ProcessingException, ConfigurationException, ParsingException
responseType
- an artifactResponseParsingException
ConfigurationException
ProcessingException
Copyright © 2021 JBoss by Red Hat. All rights reserved.