element specifies a subject by specifying data that
authenticates the subject.
Constructor Summary |
SubjectConfirmation(org.w3c.dom.Element subjectConfirmationElement)
Constructs 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)
Constructs an SubjectConfirmation instance. |
SubjectConfirmation(java.lang.String confirmationMethod)
From scratch constructor for a single confirmation method. |
Method Summary |
boolean |
addConfirmationMethod(java.lang.String confirmationMethod)
Adds a confirmationMethod to this
SubjectConfirmation element. |
boolean |
equals(SubjectConfirmation subjectConfirmation)
Checks for equality between this object and the
SubjectConfirmation passed down as parameter. |
java.util.Set |
getConfirmationMethod()
Get Confirmation Method(s) |
org.w3c.dom.Element |
getKeyInfo()
Returns 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()
Returns a String representation of the element |
java.lang.String |
toString(boolean includeNS,
boolean declareNS)
Returns 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
- Constructs a subject confirmation element from an existing
XML block.
- Parameters:
subjectConfirmationElement
- a DOM Element representing the
SubjectConfirmation
object.- Throws:
SAMLException
-
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 protocol 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 confirmationMethods
is
empty.
SubjectConfirmation
public SubjectConfirmation(java.util.Set confirmationMethods,
org.w3c.dom.Element subjectConfirmationData,
org.w3c.dom.Element keyInfo)
throws SAMLException
- Constructs an
SubjectConfirmation
instance.
- 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)
- Adds 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:
- true indicating success 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:
- true indicating success of the operation.
setSubjectConfirmationData
public boolean setSubjectConfirmationData(java.lang.String scDataString)
- Set the
SubjectConfirmationData
.
- Parameters:
scDataString
- A String representation of the subject
confirmation data within this SubjectConfirmation
element.- Returns:
- true if the operation succeed.
getKeyInfo
public org.w3c.dom.Element getKeyInfo()
- Returns the key info.
- Returns:
- The key info.
setKeyInfo
public boolean setKeyInfo(org.w3c.dom.Element keyInfo)
- Set the key info.
- Parameters:
keyInfo
- dsig.KeyInfo
.- Returns:
- true if operations succeeds.
equals
public boolean equals(SubjectConfirmation subjectConfirmation)
- Checks for equality between this object and the
SubjectConfirmation
passed 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 on SubjectConfirmationData
.
Note: no check is done for KeyInfo
.
- Parameters:
subjectConfirmation
- SubjectConfirmation
to be
checked.- Returns:
- true if the two are EXACTLY equal.
toString
public java.lang.String toString()
- Returns 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
example
<saml:SubjectConfirmation>
.
toString
public java.lang.String toString(boolean includeNS,
boolean declareNS)
- 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.
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.