Class TokenParamsValidator


  • public class TokenParamsValidator
    extends java.lang.Object
    Validates the parameters received for the token web service.
    Version:
    February 25, 2020
    Author:
    Javier Rojas Blum
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean validateGrantType​(io.jans.as.model.common.GrantType requestedGrantType, io.jans.as.model.common.GrantType[] clientGrantTypesArray, java.util.Set<io.jans.as.model.common.GrantType> grantTypesSupported)  
      static boolean validateParams​(java.lang.String clientId, java.lang.String clientSecret)  
      static boolean validateParams​(java.lang.String grantType, java.lang.String code, java.lang.String redirectUri, java.lang.String username, java.lang.String password, java.lang.String scope, java.lang.String assertion, java.lang.String refreshToken)
      Validates the parameters for a token request.
      • Methods inherited from class java.lang.Object

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

      • TokenParamsValidator

        public TokenParamsValidator()
    • Method Detail

      • validateParams

        public static boolean validateParams​(java.lang.String grantType,
                                             java.lang.String code,
                                             java.lang.String redirectUri,
                                             java.lang.String username,
                                             java.lang.String password,
                                             java.lang.String scope,
                                             java.lang.String assertion,
                                             java.lang.String refreshToken)
        Validates the parameters for a token request.
        Parameters:
        grantType - The grant type. This parameter is mandatory. Value must be set to: authorization_code, password, client_credentials, refresh_token, or a valid URI.
        code - The authorization code.
        redirectUri -
        username -
        password -
        scope -
        assertion -
        refreshToken -
        Returns:
        Returns true when all the parameters are valid.
      • validateParams

        public static boolean validateParams​(java.lang.String clientId,
                                             java.lang.String clientSecret)
      • validateGrantType

        public static boolean validateGrantType​(io.jans.as.model.common.GrantType requestedGrantType,
                                                io.jans.as.model.common.GrantType[] clientGrantTypesArray,
                                                java.util.Set<io.jans.as.model.common.GrantType> grantTypesSupported)