|
|||||||||||
| 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 |
ENC_KEY_SHA1_URI
|
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 KeyIdentifier. |
org.w3c.dom.Element |
getKeyIdentifierTokenElement(org.w3c.dom.Document doc,
WSDocInfo docInfo,
javax.security.auth.callback.CallbackHandler cb)
Gets the signing token element, which may be a BinarySecurityToken
or a SAML token. |
java.lang.String |
getKeyIdentifierValue()
|
java.lang.String |
getKeyIdentifierValueType()
|
Reference |
getReference()
Gets the Reference. |
byte[] |
getSKIBytes()
|
org.w3c.dom.Element |
getTokenElement(org.w3c.dom.Document doc,
WSDocInfo docInfo,
javax.security.auth.callback.CallbackHandler cb)
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.lang.String valueType,
java.lang.String keyIdVal)
|
void |
setKeyIdentifier(java.security.cert.X509Certificate cert)
Sets the KeyIdentifier Element as a X509 certificate. |
void |
setKeyIdentifierEncKeySHA1(java.lang.String value)
|
void |
setKeyIdentifierSKI(java.security.cert.X509Certificate cert,
Crypto crypto)
Sets the KeyIdentifier Element as a X509 Subject-Key-Identifier (SKI). |
void |
setKeyIdentifierThumb(java.security.cert.X509Certificate cert)
Sets the KeyIdentifier 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
public static final java.lang.String ENC_KEY_SHA1_URI
protected org.w3c.dom.Element element
| Constructor Detail |
public SecurityTokenReference(org.w3c.dom.Element elem)
throws WSSecurityException
elem - TODO
WSSecurityExceptionpublic SecurityTokenReference(org.w3c.dom.Document doc)
doc - TODO| Method Detail |
public void setReference(Reference ref)
ref -
public Reference getReference()
throws WSSecurityException
Reference element contained in this
SecurityTokenReference
WSSecurityException
public org.w3c.dom.Element getTokenElement(org.w3c.dom.Document doc,
WSDocInfo docInfo,
javax.security.auth.callback.CallbackHandler cb)
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 org.w3c.dom.Element getKeyIdentifierTokenElement(org.w3c.dom.Document doc,
WSDocInfo docInfo,
javax.security.auth.callback.CallbackHandler cb)
throws WSSecurityException
BinarySecurityToken
or a SAML token.
The method gets the value of the KeyIdentifier 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
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 certificate 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 certificate 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 certificate to get the thumbprint
WSSecurityException
public void setKeyIdentifierEncKeySHA1(java.lang.String value)
throws WSSecurityException
WSSecurityException
public void setSAMLKeyIdentifier(java.lang.String keyIdVal)
throws WSSecurityException
WSSecurityException
public void setKeyIdentifier(java.lang.String valueType,
java.lang.String keyIdVal)
throws WSSecurityException
WSSecurityExceptionpublic org.w3c.dom.Element getFirstElement()
Element child node
public java.security.cert.X509Certificate[] getKeyIdentifier(Crypto crypto)
throws WSSecurityException
WSSecurityExceptionpublic java.lang.String getKeyIdentifierValue()
public java.lang.String getKeyIdentifierValueType()
public java.lang.String getX509SKIAlias(Crypto crypto)
throws WSSecurityException
WSSecurityExceptionpublic byte[] getSKIBytes()
public void setX509IssuerSerial(org.apache.xml.security.keys.content.X509Data ref)
ref - the XMLX509IssuerSerial to put into this
SecurityTokenReference
public java.security.cert.X509Certificate[] getX509IssuerSerial(Crypto crypto)
throws WSSecurityException
WSSecurityException
public java.lang.String getX509IssuerSerialAlias(Crypto crypto)
throws WSSecurityException
WSSecurityExceptionpublic boolean containsReference()
SecurtityTokenReference contains
a wsse:Reference elementpublic int lengthReference()
wsse:Reference elements in
the SecurtityTokenReferencepublic boolean containsX509IssuerSerial()
SecurtityTokenReference contains
a ds:IssuerSerial elementpublic boolean containsX509Data()
SecurtityTokenReference contains
a ds:X509Data elementpublic int lengthX509IssuerSerial()
ds:IssuerSerial elements in
the SecurtityTokenReferencepublic int lengthX509Data()
ds:IssuerSerial elements in
the SecurtityTokenReferencepublic 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 | ||||||||||