|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.message.token.SecurityTokenReference
Security Token Reference.
Field Summary | |
protected org.w3c.dom.Element |
element
|
static java.lang.String |
KEY_NAME
|
static java.lang.String |
SAML_ID_URI
|
static java.lang.String |
SECURITY_TOKEN_REFERENCE
|
static java.lang.String |
SKI_URI
|
static java.lang.String |
THUMB_URI
|
Constructor Summary | |
SecurityTokenReference(org.w3c.dom.Document doc)
Constructor. |
|
SecurityTokenReference(org.w3c.dom.Element elem)
Constructor. |
Method Summary | |
boolean |
containsKeyIdentifier()
Method containsKeyIdentifier. |
boolean |
containsReference()
Method containsReference |
boolean |
containsX509Data()
Method containsX509Data |
boolean |
containsX509IssuerSerial()
Method containsX509IssuerSerial |
org.w3c.dom.Element |
getElement()
get the dom element. |
org.w3c.dom.Element |
getFirstElement()
get the first child element. |
java.security.cert.X509Certificate[] |
getKeyIdentifier(Crypto crypto)
Gets the KeyIdentifer. |
Reference |
getReference()
Gets the Reference. |
byte[] |
getSKIBytes()
|
org.w3c.dom.Element |
getTokenElement(org.w3c.dom.Document doc,
WSDocInfo docInfo)
Gets the signing token element, which maybe a BinarySecurityToken
or a SAML token. |
java.security.cert.X509Certificate[] |
getX509IssuerSerial(Crypto crypto)
Gets the certificate identified with X509 issuerSerial data. |
java.lang.String |
getX509IssuerSerialAlias(Crypto crypto)
Gets the alias name of the certificate identified with X509 issuerSerial data. |
java.lang.String |
getX509SKIAlias(Crypto crypto)
|
int |
length(java.lang.String namespace,
java.lang.String localname)
Method length. |
int |
lengthKeyIdentifier()
Method lengthKeyIdentifier. |
int |
lengthReference()
Method lengthReference. |
int |
lengthX509Data()
Method lengthX509Data. |
int |
lengthX509IssuerSerial()
Method lengthX509IssuerSerial. |
void |
setID(java.lang.String id)
set the id. |
void |
setKeyIdentifier(java.security.cert.X509Certificate cert)
Sets the KeyIdentifer Element as a X509 certificate. |
void |
setKeyIdentifierSKI(java.security.cert.X509Certificate cert,
Crypto crypto)
Sets the KeyIdentifer Element as a X509 Subject-Key-Identifier (SKI). |
void |
setKeyIdentifierThumb(java.security.cert.X509Certificate cert)
Sets the KeyIdentifer Element as a Thumbprint. |
void |
setReference(Reference ref)
set the reference. |
void |
setSAMLKeyIdentifier(java.lang.String keyIdVal)
|
void |
setX509IssuerSerial(org.apache.xml.security.keys.content.X509Data ref)
Sets the X509 IssuerSerial data. |
java.lang.String |
toString()
return the string representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String SECURITY_TOKEN_REFERENCE
public static final java.lang.String KEY_NAME
public static final java.lang.String SKI_URI
public static final java.lang.String THUMB_URI
public static final java.lang.String SAML_ID_URI
protected org.w3c.dom.Element element
Constructor Detail |
public SecurityTokenReference(org.w3c.dom.Element elem) throws WSSecurityException
elem
- TODO
WSSecurityException
public SecurityTokenReference(org.w3c.dom.Document doc)
doc
- TODOMethod Detail |
public void setReference(Reference ref)
ref
- public Reference getReference() throws WSSecurityException
Reference
element contained in this
SecurityTokeneReference
WSSecurityException
public org.w3c.dom.Element getTokenElement(org.w3c.dom.Document doc, WSDocInfo docInfo) throws WSSecurityException
BinarySecurityToken
or a SAML token.
The method gets the URI attribute of the Reference
contained in
the SecurityTokenReference
and tries to find the referenced
Element in the document.
doc
- the document that contains the binary security token
element. This could be different from the document
that contains the SecurityTokenReference (STR). See
STRTransform.derefenceBST() method
WSSecurityException
- When either no Reference
element, or the found
reference contains no URI, or the referenced signing not found.public void setKeyIdentifier(java.security.cert.X509Certificate cert) throws WSSecurityException
wsse:KeyIdentifier
element, which is placed
in the wsse:SecurityTokenReference
element.
cert
- is the X509 certficate to be inserted as key identifier
WSSecurityException
public void setKeyIdentifierSKI(java.security.cert.X509Certificate cert, Crypto crypto) throws WSSecurityException
wsse:KeyIdentifier
element, which is placed
in the wsse:SecurityTokenReference
element.
cert
- is the X509 certficate to get the SKIcrypto
- is the Crypto implementation. Used to read SKI info bytes from certificate
WSSecurityException
public void setKeyIdentifierThumb(java.security.cert.X509Certificate cert) throws WSSecurityException
wsse:KeyIdentifier
element, which is placed in the wsse:SecurityTokenReference
element.
cert
- is the X509 certficate to get the thumbprint
WSSecurityException
public void setSAMLKeyIdentifier(java.lang.String keyIdVal) throws WSSecurityException
WSSecurityException
public java.security.cert.X509Certificate[] getKeyIdentifier(Crypto crypto) throws WSSecurityException
WSSecurityException
public java.lang.String getX509SKIAlias(Crypto crypto) throws WSSecurityException
WSSecurityException
public byte[] getSKIBytes()
public void setX509IssuerSerial(org.apache.xml.security.keys.content.X509Data ref)
ref
- the XMLX509IssuerSerial
to put into this
SecurityTokenReferencepublic java.security.cert.X509Certificate[] getX509IssuerSerial(Crypto crypto) throws WSSecurityException
WSSecurityException
public java.lang.String getX509IssuerSerialAlias(Crypto crypto) throws WSSecurityException
WSSecurityException
public org.w3c.dom.Element getFirstElement()
Element
child nodepublic boolean containsReference()
SecurtityTokenReference
contains
a wsse:Reference
elementpublic int lengthReference()
wsse:Reference
elements in
the SecurtityTokenReference
public boolean containsX509IssuerSerial()
SecurtityTokenReference
contains
a ds:IssuerSerial
elementpublic boolean containsX509Data()
SecurtityTokenReference
contains
a ds:X509Data
elementpublic int lengthX509IssuerSerial()
ds:IssuerSerial
elements in
the SecurtityTokenReference
public int lengthX509Data()
ds:IssuerSerial
elements in
the SecurtityTokenReference
public boolean containsKeyIdentifier()
SecurtityTokenReference
contains
a wsse:KeyIdentifier
elementpublic int lengthKeyIdentifier()
wsse:KeyIdentifier
elements in
the SecurtityTokenReference
public int length(java.lang.String namespace, java.lang.String localname)
namespace
- localname
-
public org.w3c.dom.Element getElement()
public void setID(java.lang.String id)
id
- public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |