Class AcquireHoKTokenByHoKTokenSample


  • public class AcquireHoKTokenByHoKTokenSample
    extends java.lang.Object
    This sample illustrates acquiring a Holder-Of-Key token from SSO server by passing an existing Holder-Of-Key token. This sample in turn uses the AcquireHoKTokenByUserCredentialSample sample using the generated key/certificate pair at the runtime to first acquire a Holder-Of-Key token, which then is used to acquire another Holder-Of-Key token
     Usage:
     run.bat com.vmware.sso.client.samples.AcquireHoKTokenByHoKTokenSample [sso url] [username] [password]
     
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.w3c.dom.Element getToken​(java.lang.String ssoUrl, org.w3c.dom.Element token, java.security.PrivateKey privateKey, java.security.cert.X509Certificate userCert)  
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AcquireHoKTokenByHoKTokenSample

        public AcquireHoKTokenByHoKTokenSample()
    • Method Detail

      • getToken

        public static org.w3c.dom.Element getToken​(java.lang.String ssoUrl,
                                                   org.w3c.dom.Element token,
                                                   java.security.PrivateKey privateKey,
                                                   java.security.cert.X509Certificate userCert)
                                            throws javax.xml.datatype.DatatypeConfigurationException
        Parameters:
        ssoUrl - SSO server url
        token - An existing Holder-Of-Key token
        privateKey - PrivateKey of the user or solution
        userCert - X509Certificate certificate of the user or solution
        Returns:
        A new Holder-Of-Key token
        Throws:
        javax.xml.datatype.DatatypeConfigurationException
      • main

        public static void main​(java.lang.String[] args)
                         throws javax.xml.datatype.DatatypeConfigurationException
        Throws:
        javax.xml.datatype.DatatypeConfigurationException