Package com.sun.identity.wss.security
Class KeyIdentifier
- java.lang.Object
-
- com.sun.identity.wss.security.KeyIdentifier
-
public class KeyIdentifier extends Object
This classKeyIdentifiercan be be used to insert the key identifier information intoSecurityTokenReference.
-
-
Constructor Summary
Constructors Constructor Description KeyIdentifier(String valueType, String encodingType, String value)Constructor.KeyIdentifier(Element element)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToParent(Element parent)Adds the key identifier to the parent element.StringgetEncodingType()Returns the encoding type in the key identifier.StringgetId()Returns the id.StringgetReferenceValue()Returns the key identifier reference value.ElementgetTokenElement(Document doc)Returns the security token that is referenced via the key identifier.StringgetValue()Return the value in the key identifier.StringgetValueType()Returns the value type set in the key identifier.X509CertificategetX509Certificate()Returns theX509Certficatefor the value set in the key identifier.voidsetValue(String value)Sets the value in the key identifier.
-
-
-
Constructor Detail
-
KeyIdentifier
public KeyIdentifier(String valueType, String encodingType, String value)
Constructor.- Parameters:
valueType- the value type of the key value.encodingType- the encoding type of the key valuevalue- the key identifier value.
-
KeyIdentifier
public KeyIdentifier(Element element) throws SecurityException
Constructor- Parameters:
element- KeyIdentifier element- Throws:
SecurityException- if the element parsing is failed.
-
-
Method Detail
-
getX509Certificate
public X509Certificate getX509Certificate() throws SecurityException
Returns theX509Certficatefor the value set in the key identifier.- Throws:
SecurityException
-
getValueType
public String getValueType()
Returns the value type set in the key identifier.- Returns:
- the value type.
-
getEncodingType
public String getEncodingType()
Returns the encoding type in the key identifier.- Returns:
- the encoding type.
-
getReferenceValue
public String getReferenceValue()
Returns the key identifier reference value.- Returns:
- the key identifier reference value.
-
getValue
public String getValue()
Return the value in the key identifier.- Returns:
- the value in the keu identifier.
-
setValue
public void setValue(String value)
Sets the value in the key identifier.- Parameters:
value- the value in the key identifier.
-
getId
public String getId()
Returns the id.- Returns:
- the id.
-
getTokenElement
public Element getTokenElement(Document doc) throws SecurityException
Returns the security token that is referenced via the key identifier.- Parameters:
doc- the SOAPMessage XML document- Returns:
- the security token element matches with the assertion.
- Throws:
SecurityException- if there is a failure.
-
addToParent
public void addToParent(Element parent) throws SecurityException
Adds the key identifier to the parent element.- Parameters:
parent- the parent node that keyidentifier needs to be added.- Throws:
SecurityException- if there is a failure.
-
-