Package com.vmware.sso.client.samples
Class ValidateTokenSample
- java.lang.Object
-
- com.vmware.sso.client.samples.ValidateTokenSample
-
public class ValidateTokenSample extends java.lang.ObjectThis sample illustrates validating a SAML token received from SSO server. This sample in turn uses theAcquireHoKTokenByUserCredentialSampleandAcquireBearerTokenByUserCredentialSamplesamples using the generated key/certificate pair at the runtime to first acquire a token, which are then used to validateUsage: run.bat com.vmware.sso.client.samples.ValidateTokenSample [sso url] [username] [password]
-
-
Constructor Summary
Constructors Constructor Description ValidateTokenSample()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisTokenValid(java.lang.String ssoUrl, org.w3c.dom.Element token)static voidmain(java.lang.String[] args)
-
-
-
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 urltoken- 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
-
-