Package com.vmware.sso.client.samples
Class RenewTokenSample
- java.lang.Object
-
- com.vmware.sso.client.samples.RenewTokenSample
-
public class RenewTokenSample extends java.lang.ObjectThis sample illustrates renewing a Holder-Of-Key token from SSO server. This sample in turn uses theAcquireHoKTokenByUserCredentialSamplesample using the generated key/certificate pair at the runtime to first acquire a Holder-Of-Key token, which then is used to renewUsage: run.bat com.vmware.sso.client.samples.RenewTokenSample [sso url] [username] [password] [durationInSeconds]
-
-
Constructor Summary
Constructors Constructor Description RenewTokenSample()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)static org.w3c.dom.ElementrenewToken(java.lang.String ssoUrl, org.w3c.dom.Element token, java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert, long durationInSeconds)
-
-
-
Method Detail
-
renewToken
public static org.w3c.dom.Element renewToken(java.lang.String ssoUrl, org.w3c.dom.Element token, java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert, long durationInSeconds) throws javax.xml.datatype.DatatypeConfigurationException- Parameters:
ssoUrl- SSO server urltoken- An existing Holder-Of-Key tokenprivateKey-PrivateKeyof the user or solutioncert-X509Certificatecertificate of the user or solutiondurationInSeconds- Duration in seconds the token should be kept valid from the current time.- Returns:
- A renewed Holder-Of-Key token
- Throws:
javax.xml.datatype.DatatypeConfigurationException
-
main
public static void main(java.lang.String[] args) throws javax.xml.datatype.DatatypeConfigurationException, java.lang.InterruptedException- Throws:
javax.xml.datatype.DatatypeConfigurationExceptionjava.lang.InterruptedException
-
-