Package io.jans.as.server.model.token
Class TokenParamsValidator
- java.lang.Object
-
- io.jans.as.server.model.token.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
-
-
Constructor Summary
Constructors Constructor Description TokenParamsValidator()
-
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.
-
-
-
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 validURI
.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)
-
-