Class WSSecurityPropagationHelper

java.lang.Object
com.ibm.wsspi.security.token.WSSecurityPropagationHelper

public class WSSecurityPropagationHelper extends Object
This class provides some helper methods to retrieve the user information from an LTPA token.
Since:
5.1.1
  • Constructor Details

    • WSSecurityPropagationHelper

      public WSSecurityPropagationHelper()
  • Method Details

    • validateToken

      public static ValidationResult validateToken(byte[] token) throws com.ibm.websphere.security.auth.ValidationFailedException

      This method validates an LTPA token and will return a ValidationResult object. If the token cannot be validated, is expired or null, a ValidationFailedException will be thrown.

      The validateToken API requires a Java 2 Security permission, WebSphereRuntimePermission "validateLTPAToken". You can retrieve the LtpaToken2 from the JAAS custom login module sharedState Constants.WSSSOTOKEN_KEY or callback WSCredTokenCallbackImpl. See the JAAS custom login module sample for detail information. You can also retrieve the LtpaToken2 from the LTPA cookie If you call this API with the LTPA cookie value, then you must decode the LTPA cookie value. Example: byte[] ltpaToken = Base64.getDecoder().decode(ltpaCookieValue);
      Parameters:
      byte - [] (LtpaToken2)
      Returns:
      ValidationResult
      Throws:
      com.ibm.websphere.security.auth.ValidationFailedException