org.apache.ws.sandbox.security.trust.message.token
Class STSSignedToken

java.lang.Object
  extended byorg.apache.ws.sandbox.security.trust.message.token.STSSignedToken

public class STSSignedToken
extends java.lang.Object

Author:
Malinda Kaushalye

Specially for usage of STS. Token Issuer developers can use this class to get their token signed. The cannonicalization algorithm used here is http://www.w3.org/2001/10/xml-exc-c14n#.

According to the public key algorithm the signature algorithm is recognized. There are two such algorithms that are supported here. They are 1. http://www.w3.org/2000/09/xmldsig#dsa-sha1 2. http://www.w3.org/2000/09/xmldsig#rsa-sha1

If the public key algorithm is not supported then a WSSecurityException is thrown. Else it creates an XMLSignature and signs it using private key of the Security Token Service


Constructor Summary
STSSignedToken(org.w3c.dom.Document docTobeSigned, Crypto crypto, java.lang.String alias, java.lang.String password)
           
 
Method Summary
 org.w3c.dom.Element getElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

STSSignedToken

public STSSignedToken(org.w3c.dom.Document docTobeSigned,
                      Crypto crypto,
                      java.lang.String alias,
                      java.lang.String password)
               throws WSSecurityException
Parameters:
docTobeSigned - the document to be signed
crypto -
alias - alias of the x509 certificate
password - password of that particular certificate of the keystore
Throws:
WSSecurityException
Method Detail

getElement

public org.w3c.dom.Element getElement()
Returns:
the signature element


Copyright © 2004-2008 Apache Web Services. All Rights Reserved.