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 ResponseTypesp - idp - issuerInfo - ConfigurationExceptionProcessingExceptionpublic 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 issuerConfigurationExceptionProcessingExceptionpublic ResponseType createResponseType(String ID)
public ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, AssertionType assertion) throws ConfigurationException
ID - issuerInfo - assertion - ConfigurationExceptionpublic ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, Element encryptedAssertion) throws ConfigurationException
ID - issuerInfo - encryptedAssertion - a DOM Element that represents an encrypted assertionConfigurationExceptionpublic void createTimedConditions(AssertionType assertion, long durationInMilis) throws ConfigurationException, IssueInstantMissingException
assertion - durationInMilis - ConfigurationExceptionIssueInstantMissingExceptionpublic EncryptedAssertionType getEncryptedAssertion(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
is - ParsingExceptionProcessingExceptionConfigurationExceptionpublic AssertionType getAssertionType(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
is - ParsingExceptionProcessingExceptionConfigurationExceptionpublic SAMLDocumentHolder getSamlDocumentHolder()
SAMLDocumentHolderpublic ResponseType getResponseType(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
is - ParsingExceptionConfigurationExceptionProcessingExceptionpublic SAML2Object getSAML2ObjectFromStream(InputStream is) throws ParsingException, ConfigurationException, ProcessingException
SAML2Object from an input streamis - ParsingExceptionConfigurationExceptionProcessingExceptionpublic Document convert(EncryptedElementType encryptedElementType) throws ConfigurationException
encryptedElementType - ConfigurationExceptionpublic Document convert(StatusResponseType responseType) throws ProcessingException, ConfigurationException, ParsingException
responseType - ParsingExceptionConfigurationExceptionParserConfigurationExceptionProcessingExceptionpublic void marshall(ResponseType responseType, OutputStream os) throws ProcessingException
responseType - os - ProcessingExceptionpublic void marshall(ResponseType responseType, Writer writer) throws ProcessingException
responseType - writer - ProcessingExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.