public class SAML2TokenIssuer extends Object implements TokenIssuer
Modifier and Type | Field and Description |
---|---|
protected List<org.opensaml.xml.signature.Signature> |
signatureList |
Constructor and Description |
---|
SAML2TokenIssuer() |
Modifier and Type | Method and Description |
---|---|
protected org.opensaml.saml2.core.Assertion |
buildAssertion(Document doc,
org.apache.ws.security.components.crypto.Crypto crypto,
RahasData data)
This methods builds the SAML2 assertion.
|
protected org.opensaml.saml2.core.AttributeStatement |
createAttributeStatement(RahasData data)
This method creates an AttributeStatement.
|
protected org.opensaml.saml2.core.AuthnStatement |
createAuthenticationStatement(RahasData data)
This method creates an authentication statement.
|
protected org.opensaml.xml.signature.KeyInfo |
createKeyInfo(Document doc,
org.apache.ws.security.components.crypto.Crypto crypto,
RahasData data)
This method creates the KeyInfo relevant for the assertion.
|
protected org.apache.axiom.soap.SOAPEnvelope |
createRequestSecurityTokenResponse(RahasData rahasData,
org.opensaml.saml2.core.Assertion assertion,
org.apache.axiom.soap.SOAPEnvelope soapEnvelope)
This method prepares the final response.
|
protected org.opensaml.saml2.core.Subject |
createSubjectWithBearerSubjectConfirmation(RahasData data)
This method creates a subject element with the bearer subject confirmation method.
|
protected org.opensaml.saml2.core.Subject |
createSubjectWithHolderOfKeySubjectConfirmation(Document doc,
org.apache.ws.security.components.crypto.Crypto crypto,
org.joda.time.DateTime creationTime,
org.joda.time.DateTime expirationTime,
RahasData data)
This method will create a SAML 2 subject based on Holder of Key confirmation method.
|
String |
getResponseAction(RahasData data)
Returns the
wsa:Action of the response. |
org.apache.axiom.soap.SOAPEnvelope |
issue(RahasData data)
This is the main method which issues SAML2 assertions as security token responses.
|
void |
setConfigurationElement(org.apache.axiom.om.OMElement configElement)
Set the configuration element of this TokenIssuer.
|
void |
setConfigurationFile(String configFile)
Set the configuration file of this TokenIssuer.
|
void |
setConfigurationParamName(String configParamName)
Set the name of the configuration parameter.
|
protected static void |
setSubjectNamedIdentifierData(org.opensaml.saml2.core.Subject subject,
String subjectNameId,
String format)
This method will set the subject principal details to the given subject.
|
protected org.opensaml.saml2.core.Assertion |
signAssertion(Document document,
org.opensaml.saml2.core.Assertion assertion,
org.apache.ws.security.components.crypto.Crypto crypto)
This method signs the given assertion with issuer's private key.
|
protected List<org.opensaml.xml.signature.Signature> signatureList
public org.apache.axiom.soap.SOAPEnvelope issue(RahasData data) throws TrustException
issue
in interface TokenIssuer
data
- A populated RahasData
instanceTrustException
- If an error occurred while creating the response.protected org.apache.axiom.soap.SOAPEnvelope createRequestSecurityTokenResponse(RahasData rahasData, org.opensaml.saml2.core.Assertion assertion, org.apache.axiom.soap.SOAPEnvelope soapEnvelope) throws TrustException
rahasData
- The configuration data which comes with RSTassertion
- OpenSAM representation of SAML2 assertion.soapEnvelope
- SOAP message envelopeTrustException
- If an error occurred while creating RequestSecurityTokenResponse.protected org.opensaml.saml2.core.Assertion buildAssertion(Document doc, org.apache.ws.security.components.crypto.Crypto crypto, RahasData data) throws TrustException
doc
- The Document which comprises SAML 2 assertion.crypto
- Crypto properties.data
- The RST data and other configuration information.TrustException
- If an error occurred while creating the Assertion.protected org.opensaml.saml2.core.Subject createSubjectWithHolderOfKeySubjectConfirmation(Document doc, org.apache.ws.security.components.crypto.Crypto crypto, org.joda.time.DateTime creationTime, org.joda.time.DateTime expirationTime, RahasData data) throws TrustException
doc
- The original XML document which we need to include the assertion.crypto
- The relevant crypto propertiescreationTime
- The time that assertion was created.expirationTime
- The expiring timedata
- The configuration data relevant request.TrustException
- If an error occurred while creating the subject.protected org.opensaml.saml2.core.Subject createSubjectWithBearerSubjectConfirmation(RahasData data) throws TrustException
data
- RahasData elementTrustException
- if an error occurred while creating the subject.protected org.opensaml.saml2.core.Assertion signAssertion(Document document, org.opensaml.saml2.core.Assertion assertion, org.apache.ws.security.components.crypto.Crypto crypto) throws TrustException
document
- The original RST document.assertion
- Assertion to be signed.crypto
- The cryptographic properties.TrustException
- If an error occurred while signing the assertion.protected org.opensaml.saml2.core.AttributeStatement createAttributeStatement(RahasData data) throws TrustException
data
- The RahasData which carry information about RST.TrustException
- If an error occurred while creating the AttributeStatement.protected org.opensaml.saml2.core.AuthnStatement createAuthenticationStatement(RahasData data) throws TrustException
data
- The RahasData which carry information about RST.TrustException
- If an error occurred while creating the authentication statement.protected static void setSubjectNamedIdentifierData(org.opensaml.saml2.core.Subject subject, String subjectNameId, String format) throws TrustException
subject
- The subject.subjectNameId
- Subject name id, to identify the principalformat
- Format of the subjectNameId, i.e. email, x509subject etc ...TrustException
- If an error occurred while building NameID.protected org.opensaml.xml.signature.KeyInfo createKeyInfo(Document doc, org.apache.ws.security.components.crypto.Crypto crypto, RahasData data) throws TrustException
doc
- The document which we are processing.crypto
- Includes crypto properties relevant to issuer.data
- Includes metadata about the RST.TrustException
- If an error occurred while creating the KeyInfo object.public String getResponseAction(RahasData data) throws TrustException
TokenIssuer
wsa:Action
of the response.getResponseAction
in interface TokenIssuer
data
- A populated RahasData
instancewsa:Action
of the responseTrustException
- If an error occurred while during operation.public void setConfigurationFile(String configFile)
TokenIssuer
setConfigurationFile
in interface TokenIssuer
configFile
- Sets the token issuer configuration file.public void setConfigurationElement(org.apache.axiom.om.OMElement configElement)
TokenIssuer
setConfigurationElement
in interface TokenIssuer
configElement
- OMElement
representing the configurationpublic void setConfigurationParamName(String configParamName)
TokenIssuer
org.apache.axis2.description.Parameter
object available in
the via the messageContext when the TokenIssuer
is called.setConfigurationParamName
in interface TokenIssuer
configParamName
- The configuration parameter to be set.Parameter
Copyright © Apache Software Foundation. All Rights Reserved.