Package com.sun.identity.saml.assertion
Class SubjectConfirmation
java.lang.Object
com.sun.identity.saml.assertion.SubjectConfirmation
The
SubjectConfirmation element specifies a subject by specifying
data that authenticates the subject.-
Constructor Summary
ConstructorsConstructorDescriptionSubjectConfirmation(String confirmationMethod) Constructor with a single confirmation method.SubjectConfirmation(Set confirmationMethods) Constructor for multiple confirmation methodsSubjectConfirmation(Set confirmationMethods, Element subjectConfirmationData, Element keyInfo) Constructs anSubjectConfirmationinstance.SubjectConfirmation(Element subjectConfirmationElement) Constructs a subject confirmation element from an existing XML block. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddConfirmationMethod(String confirmationMethod) Adds aconfirmationMethodto thisSubjectConfirmationelement.booleanequals(SubjectConfirmation subjectConfirmation) Checks for equality between this object and theSubjectConfirmationpassed down as parameter.Gets Confirmation Method(s)Returns the key info.Get Subject Confirmation DatabooleansetKeyInfo(Element keyInfo) Sets the key info.booleansetSubjectConfirmationData(String scDataString) Sets theSubjectConfirmationData.booleansetSubjectConfirmationData(Element subjectConfirmationData) Sets theSubjectConfirmationDatatoString()Returns a String representation of the elementtoString(boolean includeNS, boolean declareNS) Returns a String representation of the<SubjectConfirmation>element.
-
Constructor Details
-
SubjectConfirmation
Constructs a subject confirmation element from an existing XML block.- Parameters:
subjectConfirmationElement- a DOM Element representing theSubjectConfirmationobject.- Throws:
SAMLException- If there was an error while constructing this object.
-
SubjectConfirmation
Constructor with a single confirmation method.- Parameters:
confirmationMethod- A URI (String) that identifies a protocol used to authenticate aSubject. Please refer todraft-sstc-core-25Section 7 for a list of URIs identifying common authentication protocols.- Throws:
SAMLException- if the input data is null.
-
SubjectConfirmation
Constructor for multiple confirmation methods- Parameters:
confirmationMethods- aSetofconfirmationMethods- Throws:
SAMLException- if theconfirmationMethodsis empty.
-
SubjectConfirmation
public SubjectConfirmation(Set confirmationMethods, Element subjectConfirmationData, Element keyInfo) throws SAMLException Constructs anSubjectConfirmationinstance.- Parameters:
confirmationMethods- A set ofconfirmationMethodseach of which is a URI (String) that identifies a protocol used to authenticate aSubject. Please refer todraft-sstc-core-25Section 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 nosubjectConfirmationDatafor theSubjectConfirmationobject.keyInfo- An XML signature element that specifies a cryptographic key held by theSubject.- Throws:
SAMLException- if the input data is invalid orconfirmationMethodsis empty.
-
-
Method Details
-
addConfirmationMethod
Adds aconfirmationMethodto thisSubjectConfirmationelement.- Parameters:
confirmationMethod- a String which is a URI (String) that identifies a protocol used to authenticate aSubject.- Returns:
- true indicating success of the operation.
-
getConfirmationMethod
Gets Confirmation Method(s)- Returns:
- A
java.util.Setof confirmation Methods. Each method contained within is aStringrepresenting the confirmation method.
-
getSubjectConfirmationData
Get Subject Confirmation Data- Returns:
- A String representation of the subject confirmation data with the Subject Confirmation element
-
setSubjectConfirmationData
Sets theSubjectConfirmationData- Parameters:
subjectConfirmationData- A String representation of the subject confirmation data within thisSubjectConfirmationelement- Returns:
- true indicating success of the operation.
-
setSubjectConfirmationData
Sets theSubjectConfirmationData.- Parameters:
scDataString- A String representation of the subject confirmation data within thisSubjectConfirmationelement.- Returns:
- true if the operation succeed.
-
getKeyInfo
Returns the key info.- Returns:
- The key info.
-
setKeyInfo
Sets the key info.- Parameters:
keyInfo-dsig.KeyInfo.- Returns:
- true if operations succeeds.
-
equals
Checks for equality between this object and theSubjectConfirmationpassed down as parameter. Checks to see that each have confirmations method present in the other one (does not care about sequence) Also does an exact match onSubjectConfirmationData. Note: no check is done forKeyInfo.- Parameters:
subjectConfirmation-SubjectConfirmationto be checked.- Returns:
- true if the two are EXACTLY equal.
-
toString
Returns a String representation of the element -
toString
Returns a String representation of the<SubjectConfirmation>element.- Parameters:
includeNS- Determines whether or not the namespace qualifier is prepended to the Element when converteddeclareNS- Determines whether or not the namespace is declared within the Element.- Returns:
- A string containing the valid XML for this element.
-