Class RegisterParamsValidator
java.lang.Object
org.gluu.oxauth.model.registration.RegisterParamsValidator
Validates the parameters received for the register web service.
- Version:
- October 22, 2019
- Author:
- Javier Rojas Blum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckIfThereIsPasswordGrantType(List<GrantType> grantTypes) Check if exists a Password Grant Type in the list of Grant Types.voidvalidateAlgorithms(RegisterRequest registerRequest) Validates all algorithms received for a register client request.booleanvalidateInitiateLoginUri(String initiateLoginUri) voidvalidateLogoutUri(String logoutUri, List<String> redirectUris, ErrorResponseFactory errorResponseFactory) voidvalidateLogoutUri(List<String> logoutUris, List<String> redirectUris, ErrorResponseFactory errorResponseFactory) booleanvalidateParamsClientRead(String clientId, String accessToken) Validates the parameters for a client read request.validateParamsClientRegister(ApplicationType applicationType, SubjectType subjectType, List<GrantType> grantTypes, List<ResponseType> responseTypes, List<String> redirectUris) Validates the parameters for a register request.booleanvalidateRedirectUris(List<GrantType> grantTypes, List<ResponseType> responseTypes, ApplicationType applicationType, SubjectType subjectType, List<String> redirectUris, String sectorIdentifierUrl)
-
Constructor Details
-
RegisterParamsValidator
public RegisterParamsValidator()
-
-
Method Details
-
validateParamsClientRegister
public Pair<Boolean,String> validateParamsClientRegister(ApplicationType applicationType, SubjectType subjectType, List<GrantType> grantTypes, List<ResponseType> responseTypes, List<String> redirectUris) Validates the parameters for a register request.- Parameters:
applicationType- The Application Type: native or web.subjectType- The subject_type requested for responses to this Client.grantTypes- Grant Types that the Client is declaring that it will restrict itself to using.redirectUris- Space-separated list of redirect URIs.- Returns:
- Whether the parameters of client register is valid or not.
-
validateAlgorithms
Validates all algorithms received for a register client request. It throws a WebApplicationException whether a validation doesn't pass.- Parameters:
registerRequest- Object containing all parameters received to register a client.
-
validateParamsClientRead
Validates the parameters for a client read request.- Parameters:
clientId- Unique Client identifier.accessToken- Access Token obtained out of band to authorize the registrant.- Returns:
- Whether the parameters of client read is valid or not.
-
validateRedirectUris
public boolean validateRedirectUris(List<GrantType> grantTypes, List<ResponseType> responseTypes, ApplicationType applicationType, SubjectType subjectType, List<String> redirectUris, String sectorIdentifierUrl) - Parameters:
grantTypes- Grant Types that the Client is declaring that it will restrict itself to using.applicationType- The Application Type: native or web.subjectType- Subject Type requested for responses to this Client.redirectUris- Redirection URI values used by the Client.sectorIdentifierUrl- A HTTPS scheme URL to be used in calculating Pseudonymous Identifiers by the OP. The URL contains a file with a single JSON array of redirect_uri values.- Returns:
- Whether the Redirect URI parameters are valid or not.
-
validateInitiateLoginUri
-
validateLogoutUri
public void validateLogoutUri(List<String> logoutUris, List<String> redirectUris, ErrorResponseFactory errorResponseFactory) -
validateLogoutUri
public void validateLogoutUri(String logoutUri, List<String> redirectUris, ErrorResponseFactory errorResponseFactory) -
checkIfThereIsPasswordGrantType
Check if exists a Password Grant Type in the list of Grant Types.- Parameters:
grantTypes- List of Grant Types.- Returns:
- True if Password Grant Type exists in the list, otherwise false
-