Class ValidateTokenSample


  • public class ValidateTokenSample
    extends java.lang.Object
    This sample illustrates validating a SAML token received from SSO server. This sample in turn uses the AcquireHoKTokenByUserCredentialSample and AcquireBearerTokenByUserCredentialSample samples using the generated key/certificate pair at the runtime to first acquire a token, which are then used to validate
     Usage:
     run.bat com.vmware.sso.client.samples.ValidateTokenSample [sso url] [username] [password]
     
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isTokenValid​(java.lang.String ssoUrl, org.w3c.dom.Element token)  
      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

      • ValidateTokenSample

        public ValidateTokenSample()
    • Method Detail

      • isTokenValid

        public static boolean isTokenValid​(java.lang.String ssoUrl,
                                           org.w3c.dom.Element token)
                                    throws javax.xml.datatype.DatatypeConfigurationException
        Parameters:
        ssoUrl - SSO server url
        token - An existing token to be verified
        Returns:
        true is valid, false otherwise
        Throws:
        javax.xml.datatype.DatatypeConfigurationException
      • main

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