public class SAML2Request extends Object
Constructor and Description |
---|
SAML2Request() |
Modifier and Type | Method and Description |
---|---|
static Document |
convert(RequestAbstractType rat)
Return the DOM object
|
static Document |
convert(ResponseType responseType)
Convert a SAML2 Response into a Document
|
AuthnRequestType |
createAuthnRequestType(String id,
String assertionConsumerURL,
String destination,
String issuerValue)
Create authentication request with protocolBinding defaulting to POST
|
AuthnRequestType |
createAuthnRequestType(String id,
String assertionConsumerURL,
String destination,
String issuerValue,
URI protocolBinding)
Create an authentication request
|
static LogoutRequestType |
createLogoutRequest(NameIDType issuer)
Create a Logout Request
|
AuthnRequestType |
getAuthnRequestType(InputStream is)
Get the AuthnRequestType from an input stream
|
AuthnRequestType |
getAuthnRequestType(String fileName)
Get AuthnRequestType from a file
|
RequestAbstractType |
getRequestType(InputStream is)
Get a Request Type from Input Stream
|
static SAMLDocumentHolder |
getSAML2ObjectFromDocument(Document samlDocument)
Get the Underlying SAML2Object from a document
|
static SAMLDocumentHolder |
getSAML2ObjectFromStream(InputStream is)
Get the Underlying SAML2Object from the input stream
|
SAMLDocumentHolder |
getSamlDocumentHolder()
Get the parsed
SAMLDocumentHolder |
static void |
marshall(RequestAbstractType requestType,
OutputStream os)
Marshall the AuthnRequestType to an output stream
|
static void |
marshall(RequestAbstractType requestType,
Writer writer)
Marshall the AuthnRequestType to a writer
|
void |
setNameIDFormat(String nameIDFormat)
Set the NameIDFormat
|
public void setNameIDFormat(String nameIDFormat)
nameIDFormat
- public AuthnRequestType createAuthnRequestType(String id, String assertionConsumerURL, String destination, String issuerValue) throws ConfigurationException
id
- assertionConsumerURL
- destination
- issuerValue
- ConfigurationException
public AuthnRequestType createAuthnRequestType(String id, String assertionConsumerURL, String destination, String issuerValue, URI protocolBinding) throws ConfigurationException
id
- assertionConsumerURL
- destination
- issuerValue
- protocolBindingUri
- ConfigurationException
public AuthnRequestType getAuthnRequestType(String fileName) throws ConfigurationException, ProcessingException, ParsingException
fileName
- file with the serialized AuthnRequestTypeParsingException
ProcessingException
ConfigurationException
IllegalArgumentException
- if the input fileName is null IllegalStateException if the InputStream from the
fileName
is nullpublic static SAMLDocumentHolder getSAML2ObjectFromStream(InputStream is) throws ConfigurationException, ParsingException, ProcessingException
is
- IOException
ParsingException
ConfigurationException
ProcessingException
public static SAMLDocumentHolder getSAML2ObjectFromDocument(Document samlDocument) throws ProcessingException, ParsingException
samlDocument
- a Document containing a SAML2ObjectProcessingException
ParsingException
public RequestAbstractType getRequestType(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
is
- ProcessingException
ConfigurationException
IllegalArgumentException
- inputstream is nullParsingException
public AuthnRequestType getAuthnRequestType(InputStream is) throws ConfigurationException, ProcessingException, ParsingException
is
- Inputstream containing the AuthnRequestParsingException
ProcessingException
ConfigurationException
IllegalArgumentException
- inputstream is nullpublic SAMLDocumentHolder getSamlDocumentHolder()
SAMLDocumentHolder
public static LogoutRequestType createLogoutRequest(NameIDType issuer) throws ConfigurationException
issuer
- ConfigurationException
public static Document convert(RequestAbstractType rat) throws ProcessingException, ConfigurationException, ParsingException
rat
- ProcessingException
ParsingException
ConfigurationException
public static Document convert(ResponseType responseType) throws ProcessingException, ParsingException, ConfigurationException
responseType
- ProcessingException
ParsingException
ConfigurationException
public static void marshall(RequestAbstractType requestType, OutputStream os) throws ProcessingException
requestType
- os
- ProcessingException
public static void marshall(RequestAbstractType requestType, Writer writer) throws ProcessingException
requestType
- writer
- ProcessingException
Copyright © 2021 JBoss by Red Hat. All rights reserved.