public class SAML2Response extends Object
Constructor and Description |
---|
SAML2Response() |
Modifier and Type | Method and Description |
---|---|
Document |
convert(EncryptedElementType encryptedElementType)
Convert an EncryptedElement into a Document
|
Document |
convert(StatusResponseType responseType)
Convert a SAML2 Response into a Document
|
AssertionType |
createAssertion(String id,
NameIDType issuer)
Create an assertion
|
AuthnStatementType |
createAuthnStatement(String authnContextDeclRef,
XMLGregorianCalendar issueInstant)
Create an AuthnStatement
|
AuthzDecisionStatementType |
createAuthzDecisionStatementType(String resource,
DecisionType decision,
EvidenceType evidence,
ActionType... actions)
Create an Authorization Decision Statement Type
|
ResponseType |
createResponseType(String ID)
Create an empty response type
|
ResponseType |
createResponseType(String ID,
IssuerInfoHolder issuerInfo,
AssertionType assertion)
Create a ResponseType
|
ResponseType |
createResponseType(String ID,
IssuerInfoHolder issuerInfo,
Element encryptedAssertion)
Create a ResponseType
|
ResponseType |
createResponseType(String ID,
SPInfoHolder sp,
IDPInfoHolder idp,
IssuerInfoHolder issuerInfo)
Create a ResponseType
NOTE:: The PicketLink STS is used to issue/update the assertion
If you want to control over the assertion being issued, then use
createResponseType(String, SPInfoHolder, IDPInfoHolder, IssuerInfoHolder, AssertionType) |
ResponseType |
createResponseType(String ID,
SPInfoHolder sp,
IDPInfoHolder idp,
IssuerInfoHolder issuerInfo,
AssertionType assertion)
Construct a
ResponseType without calling PicketLink STS for the assertion. |
void |
createTimedConditions(AssertionType assertion,
long durationInMilis)
Add validity conditions to the SAML2 Assertion
|
AssertionType |
getAssertionType(InputStream is)
Read an assertion from an input stream
|
EncryptedAssertionType |
getEncryptedAssertion(InputStream is)
Get an encrypted assertion from the stream
|
ResponseType |
getResponseType(InputStream is)
Read a ResponseType from an input stream
|
SAML2Object |
getSAML2ObjectFromStream(InputStream is)
Read a
SAML2Object from an input stream |
SAMLDocumentHolder |
getSamlDocumentHolder()
Get the parsed
SAMLDocumentHolder |
void |
marshall(ResponseType responseType,
OutputStream os)
Marshall the response type to the output stream
|
void |
marshall(ResponseType responseType,
Writer writer)
Marshall the ResponseType into a writer
|
public AssertionType createAssertion(String id, NameIDType issuer)
id
- issuer
- public AuthnStatementType createAuthnStatement(String authnContextDeclRef, XMLGregorianCalendar issueInstant)
authnContextDeclRef
- such as JBossSAMLURIConstants.AC_PASSWORD_PROTECTED_TRANSPORTissueInstant
- public AuthzDecisionStatementType createAuthzDecisionStatementType(String resource, DecisionType decision, EvidenceType evidence, ActionType... actions)
resource
- decision
- evidence
- actions
- public ResponseType createResponseType(String ID, SPInfoHolder sp, IDPInfoHolder idp, IssuerInfoHolder issuerInfo, AssertionType assertion) throws ConfigurationException, ProcessingException
ResponseType
without calling PicketLink STS for the assertion. The AssertionType
is
generated
within this methodID
- id of the ResponseType
sp
- idp
- issuerInfo
- ConfigurationException
ProcessingException
public ResponseType createResponseType(String ID, SPInfoHolder sp, IDPInfoHolder idp, IssuerInfoHolder issuerInfo) throws ConfigurationException, ProcessingException
createResponseType(String, SPInfoHolder, IDPInfoHolder, IssuerInfoHolder, AssertionType)
ID
- id of the responsesp
- holder with the information about the Service Provideridp
- holder with the information on the Identity ProviderissuerInfo
- holder with information on the issuerConfigurationException
ProcessingException
public ResponseType createResponseType(String ID)
public ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, AssertionType assertion) throws ConfigurationException
ID
- issuerInfo
- assertion
- ConfigurationException
public ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, Element encryptedAssertion) throws ConfigurationException
ID
- issuerInfo
- encryptedAssertion
- a DOM Element
that represents an encrypted assertionConfigurationException
public void createTimedConditions(AssertionType assertion, long durationInMilis) throws ConfigurationException, IssueInstantMissingException
assertion
- durationInMilis
- ConfigurationException
IssueInstantMissingException
public EncryptedAssertionType getEncryptedAssertion(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
is
- ParsingException
ProcessingException
ConfigurationException
public AssertionType getAssertionType(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
is
- ParsingException
ProcessingException
ConfigurationException
public SAMLDocumentHolder getSamlDocumentHolder()
SAMLDocumentHolder
public ResponseType getResponseType(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
is
- ParsingException
ConfigurationException
ProcessingException
public SAML2Object getSAML2ObjectFromStream(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
SAML2Object
from an input streamis
- ParsingException
ConfigurationException
ProcessingException
public Document convert(EncryptedElementType encryptedElementType) throws ConfigurationException
encryptedElementType
- ConfigurationException
public Document convert(StatusResponseType responseType) throws ProcessingException, ConfigurationException, ParsingException
responseType
- ParsingException
ConfigurationException
ProcessingException
public void marshall(ResponseType responseType, OutputStream os) throws ProcessingException
responseType
- os
- ProcessingException
public void marshall(ResponseType responseType, Writer writer) throws ProcessingException
responseType
- writer
- ProcessingException
Copyright © 2017 JBoss by Red Hat. All rights reserved.