element specifies a subject by specifying data that
authenticates the subject.
|
Constructor Summary |
SubjectConfirmation(org.w3c.dom.Element subjectConfirmationElement)
This constructor builds a subject confirmation element from an existing
XML block. |
SubjectConfirmation(java.util.Set confirmationMethods)
From scratch constructor for multiple confirmation methods |
SubjectConfirmation(java.util.Set confirmationMethods,
org.w3c.dom.Element subjectConfirmationData,
org.w3c.dom.Element keyInfo)
Constructor |
SubjectConfirmation(java.lang.String confirmationMethod)
From scratch constructor for a single confirmation method |
|
Method Summary |
boolean |
addConfirmationMethod(java.lang.String confirmationMethod)
Add a confirmationMethod to this SubjectConfirmation element. |
boolean |
equals(SubjectConfirmation subjectConfirmation)
Checks for equality between this object and the SubjectConfirmation
passed down as paramater. |
java.util.Set |
getConfirmationMethod()
Get Confirmation Method(s) |
org.w3c.dom.Element |
getKeyInfo()
Get the key info |
org.w3c.dom.Element |
getSubjectConfirmationData()
Get Subject Confirmation Data |
boolean |
setKeyInfo(org.w3c.dom.Element keyInfo)
set the key info |
boolean |
setSubjectConfirmationData(org.w3c.dom.Element subjectConfirmationData)
Set the SubjectConfirmationData |
boolean |
setSubjectConfirmationData(java.lang.String scDataString)
Set the SubjectConfirmationData |
java.lang.String |
toString()
Create a String representation of the element |
java.lang.String |
toString(boolean includeNS,
boolean declareNS)
Create a String representation of the <SubjectConfirmation> element |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SubjectConfirmation
public SubjectConfirmation(org.w3c.dom.Element subjectConfirmationElement)
throws SAMLException
- This constructor builds a subject confirmation element from an existing
XML block.
- Parameters:
subjectConfirmationElement: - a DOM Element representing the
SubjectConfirmation object.
SubjectConfirmation
public SubjectConfirmation(java.lang.String confirmationMethod)
throws SAMLException
- From scratch constructor for a single confirmation method
- Parameters:
confirmationMethod: - A URI ( String) that identifies a prtocol used
to authenticate a Subject. Please refer to draft-sstc-core-25
Section 7 for a list of URIs identifying common authentication protocols.- Throws:
SAMLException - if the input data is null.
SubjectConfirmation
public SubjectConfirmation(java.util.Set confirmationMethods)
throws SAMLException
- From scratch constructor for multiple confirmation methods
- Parameters:
confirmationMethods: - a Set of confirmationMethods- Throws:
SAMLException - if the Set is empty.
SubjectConfirmation
public SubjectConfirmation(java.util.Set confirmationMethods,
org.w3c.dom.Element subjectConfirmationData,
org.w3c.dom.Element keyInfo)
throws SAMLException
- Constructor
- Parameters:
confirmationMethods: - A Set of confirmationMethods each
of which is a URI ( String) that identifies a protocol used to authenticate
a Subject. Please refer to draft-sstc-core-25 Section 7 for
a list of URIs identifying common authentication protocols.subjectConfirmationData - : Additional authentication information to
be used by a specific authentication protocol. Can be passed as null if
there is no subjectConfirmationData for the SubjectConfirmation object.keyInfo - : An XML signature element that specifies a cryptographic
key held by the Subject.- Throws:
SAMLException - if the input data is invalid or
confirmationMethods is empty.
addConfirmationMethod
public boolean addConfirmationMethod(java.lang.String confirmationMethod)
- Add a confirmationMethod to this SubjectConfirmation element.
- Parameters:
confirmationMethod: - a String which is a URI ( String) that
identifies a protocol used to authenticate a Subject.- Returns:
- boolean indicating success or failure of the operation.
getConfirmationMethod
public java.util.Set getConfirmationMethod()
- Get Confirmation Method(s)
- Returns:
- A
java.util.Set of confirmation Methods. Each method
contained within is a String representing the confirmation
method.
getSubjectConfirmationData
public org.w3c.dom.Element getSubjectConfirmationData()
- Get Subject Confirmation Data
- Returns:
- A String representation of the subject confirmation data with the
Subject Confirmation element
setSubjectConfirmationData
public boolean setSubjectConfirmationData(org.w3c.dom.Element subjectConfirmationData)
- Set the SubjectConfirmationData
- Parameters:
subjectConfirmationData - : A String representation of the subject
confirmation data within this SubjectConfirmation element- Returns:
- boolean indicating success or failure of the operation.
setSubjectConfirmationData
public boolean setSubjectConfirmationData(java.lang.String scDataString)
- Set the SubjectConfirmationData
- Parameters:
subjectConfirmationData - : A String representation of the subject
confirmation data within this SubjectConfirmation element- Returns:
- boolean indicating success or failure of the operation.
getKeyInfo
public org.w3c.dom.Element getKeyInfo()
- Get the key info
- Returns:
- The key info
setKeyInfo
public boolean setKeyInfo(org.w3c.dom.Element keyInfo)
- set the key info
- Parameters:
keyInfo: - dsig.KeyInfo
equals
public boolean equals(SubjectConfirmation subjectConfirmation)
- Checks for equality between this object and the SubjectConfirmation
passed down as paramater. Checks to see that each have confirmations
method present in the other one ( does not care about sequence)
Also does an exact match on SubjectConfirmationData
Note: no check is done for KeyInfo.
- Parameters:
SubjectConfirmation - to be checked- Returns:
- boolean represting whether the two are EXACTLY equal or not
toString
public java.lang.String toString()
- Create a String representation of the element
- Overrides:
toString in class java.lang.Object
- Returns:
- A string containing the valid XML for this element
By default name space name is prepended to the element name
eg <saml:SubjectConfirmation>
toString
public java.lang.String toString(boolean includeNS,
boolean declareNS)
- Create a String representation of the <SubjectConfirmation> element
- Parameters:
IncludeNS - : Determines whether or not the namespace qualifier is
prepended to the Element when converted
DeclareNS : Determines whether or not the namespace is declared within the
Element.- Returns:
- A string containing the valid XML for this element