Package com.sun.identity.wss.security
Class SecurityTokenReference
- java.lang.Object
-
- com.sun.identity.wss.security.SecurityTokenReference
-
public class SecurityTokenReference extends Object
This class represents theSecurityTokenReferencefor referencing the web services tokens that are used for message level security in the SOAP header.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDIRECT_REFERENCEstatic StringKEYIDENTIFIER_REFERENCEstatic StringX509DATA_REFERENCE
-
Constructor Summary
Constructors Constructor Description SecurityTokenReference()SecurityTokenReference(Element element)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToParent(Element parent)Adds the securitytoken reference to the parent element.StringgetId()Returns the security token reference id.KeyIdentifiergetKeyIdentifier()Returns the key identifierReferencegetReference()Returns theReference.StringgetReferenceType()Returns the reference typeElementgetTokenElement(Document doc)Returns the referenced security token via the Reference URI.org.apache.xml.security.keys.content.X509DatagetX509IssuerSerial()Returns the X509data.voidsetId(String id)Sets the security token reference id.voidsetKeyIdentifier(KeyIdentifier keyIdentifier)Sets the key identifier.voidsetReference(Reference reference)Sets theReferencevoidsetReferenceType(String referenceType)Sets the reference type.voidsetX509IssuerSerial(org.apache.xml.security.keys.content.X509Data x509Data)Sets the X509Data.
-
-
-
Field Detail
-
KEYIDENTIFIER_REFERENCE
public static final String KEYIDENTIFIER_REFERENCE
- See Also:
- Constant Field Values
-
DIRECT_REFERENCE
public static final String DIRECT_REFERENCE
- See Also:
- Constant Field Values
-
X509DATA_REFERENCE
public static final String X509DATA_REFERENCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SecurityTokenReference
public SecurityTokenReference()
-
SecurityTokenReference
public SecurityTokenReference(Element element) throws SecurityException
Constructor- Parameters:
element- the security token reference.- Throws:
SecurityException- if the token parsing fails.
-
-
Method Detail
-
getReferenceType
public String getReferenceType()
Returns the reference type- Returns:
- the reference type.
-
setReferenceType
public void setReferenceType(String referenceType)
Sets the reference type.- Parameters:
referenceType- the reference type.
-
getReference
public Reference getReference()
Returns theReference.- Returns:
- the
Reference.
-
setReference
public void setReference(Reference reference)
Sets theReference- Parameters:
reference- the reference element.
-
setKeyIdentifier
public void setKeyIdentifier(KeyIdentifier keyIdentifier)
Sets the key identifier.- Parameters:
keyIdentifier- the key identifier.
-
getKeyIdentifier
public KeyIdentifier getKeyIdentifier()
Returns the key identifier- Returns:
- the key identifier
-
getId
public String getId()
Returns the security token reference id.- Returns:
- the security token reference id.
-
setId
public void setId(String id)
Sets the security token reference id.- Parameters:
id- the security token reference id.
-
getX509IssuerSerial
public org.apache.xml.security.keys.content.X509Data getX509IssuerSerial()
Returns the X509data.- Returns:
- the X509Data.
-
setX509IssuerSerial
public void setX509IssuerSerial(org.apache.xml.security.keys.content.X509Data x509Data)
Sets the X509Data.- Parameters:
x509Data- the X509 data.
-
getTokenElement
public Element getTokenElement(Document doc) throws SecurityException
Returns the referenced security token via the Reference URI.- Returns:
- the security token that is referenece via the reference URI.
- Throws:
SecurityException
-
addToParent
public void addToParent(Element parent) throws SecurityException
Adds the securitytoken reference to the parent element.- Parameters:
parent- the parent node that securitytoken reference needs to be added.- Throws:
SecurityException- if there is a failure.
-
-