|
||||||||||
| 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
public class SecurityTokenReference
Security Token Reference.
| Field Summary | |
|---|---|
protected Element |
element
|
static String |
ENC_KEY_SHA1_URI
|
static String |
KEY_NAME
|
static String |
SAML_ID_URI
|
static String |
SECURITY_TOKEN_REFERENCE
|
static String |
SKI_URI
|
static String |
THUMB_URI
|
| Constructor Summary | |
|---|---|
SecurityTokenReference(Document doc)
Constructor. |
|
SecurityTokenReference(Element elem)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
containsKerberosThumbprint()
|
boolean |
containsKeyIdentifier()
Method containsKeyIdentifier. |
boolean |
containsReference()
Method containsReference |
boolean |
containsX509Data()
Method containsX509Data |
boolean |
containsX509IssuerSerial()
Method containsX509IssuerSerial |
Element |
getElement()
get the dom element. |
Element |
getFirstElement()
get the first child element. |
KrbSession |
getKerberosSession()
|
X509Certificate[] |
getKeyIdentifier(Crypto crypto)
Gets the KeyIdentifier. |
Element |
getKeyIdentifierTokenElement(Document doc,
WSDocInfo docInfo,
CallbackHandler cb)
Gets the signing token element, which may be a BinarySecurityToken
or a SAML token. |
String |
getKeyIdentifierValue()
|
String |
getKeyIdentifierValueType()
|
Reference |
getReference()
Gets the Reference. |
byte[] |
getSKIBytes()
|
Element |
getTokenElement(Document doc,
WSDocInfo docInfo,
CallbackHandler cb)
Gets the signing token element, which maybe a BinarySecurityToken
or a SAML token. |
X509Certificate[] |
getX509IssuerSerial(Crypto crypto)
Gets the certificate identified with X509 issuerSerial data. |
String |
getX509IssuerSerialAlias(Crypto crypto)
Gets the alias name of the certificate identified with X509 issuerSerial data. |
String |
getX509SKIAlias(Crypto crypto)
|
int |
length(String namespace,
String localname)
Method length. |
int |
lengthKeyIdentifier()
Method lengthKeyIdentifier. |
int |
lengthReference()
Method lengthReference. |
int |
lengthX509Data()
Method lengthX509Data. |
int |
lengthX509IssuerSerial()
Method lengthX509IssuerSerial. |
void |
setID(String id)
set the id. |
void |
setKerberosIdentifierThumb(KrbSession session)
|
void |
setKeyIdentifier(String valueType,
String keyIdVal)
|
void |
setKeyIdentifier(X509Certificate cert)
Sets the KeyIdentifier Element as a X509 certificate. |
void |
setKeyIdentifierEncKeySHA1(String value)
|
void |
setKeyIdentifierSKI(X509Certificate cert,
Crypto crypto)
Sets the KeyIdentifier Element as a X509 Subject-Key-Identifier (SKI). |
void |
setKeyIdentifierThumb(X509Certificate cert)
Sets the KeyIdentifier Element as a Thumbprint. |
void |
setReference(Reference ref)
set the reference. |
void |
setSAMLKeyIdentifier(String keyIdVal)
|
void |
setX509IssuerSerial(org.apache.xml.security.keys.content.X509Data ref)
Sets the X509 IssuerSerial data. |
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 String SECURITY_TOKEN_REFERENCE
public static final String KEY_NAME
public static final String SKI_URI
public static final String THUMB_URI
public static final String SAML_ID_URI
public static final String ENC_KEY_SHA1_URI
protected Element element
| Constructor Detail |
|---|
public SecurityTokenReference(Element elem)
throws WSSecurityException
elem - TODO
WSSecurityExceptionpublic SecurityTokenReference(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 Element getTokenElement(Document doc,
WSDocInfo docInfo,
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 Element getKeyIdentifierTokenElement(Document doc,
WSDocInfo docInfo,
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(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(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(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(String value)
throws WSSecurityException
WSSecurityException
public void setSAMLKeyIdentifier(String keyIdVal)
throws WSSecurityException
WSSecurityException
public void setKeyIdentifier(String valueType,
String keyIdVal)
throws WSSecurityException
WSSecurityExceptionpublic Element getFirstElement()
Element child node
public X509Certificate[] getKeyIdentifier(Crypto crypto)
throws WSSecurityException
WSSecurityExceptionpublic String getKeyIdentifierValue()
public String getKeyIdentifierValueType()
public 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 X509Certificate[] getX509IssuerSerial(Crypto crypto)
throws WSSecurityException
WSSecurityException
public 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(String namespace,
String localname)
namespace - localname -
public Element getElement()
public void setID(String id)
id - public String toString()
toString in class Objectpublic void setKerberosIdentifierThumb(KrbSession session)
session - public boolean containsKerberosThumbprint()
public KrbSession getKerberosSession()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||