Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


oracle.ocsg.oauth2.ext.api
Interface CustomizedOAuth2Validator

All Superinterfaces:
OAuth2Validator
All Known Implementing Classes:
OAuth2HandlerConfig.AbstractValidator

public interface CustomizedOAuth2Validator
extends OAuth2Validator

OAuth2ServletValidateException is supposed to be thrown when validation fails. An associated error response is supposed to be generated.

See Also:
OAuth2ServletValidateException

Method Summary
 void validateAdditionalParamsInAuthRequest(Map attributes)
          With the exception of the validation of a resource owner, client, scope, redirect uri, and any additional parameters in an authorization request("oauth2/authorize")can be validated using this method.
 void validateAdditionalParamsInDelegateAuthRequest(Map attributes)
          With the exception of the validation of a resource owner, client, scope, redirect uri, and any additional parameters in a grant request("oauth2/grant")can be validated using this method.
 void validateAdditionalParamsInTokenRequest(Map attributes)
          With the exception of the validation of a resource owner, client, scope redirect uri, and any additional parameters in a token request("oauth2/token")can be validated using this method.
 void validateClientCredentials(String clientId, String password)
          Validate if one client credential is correct, when token endpoint is triggered.
 void validateGrantedScopes(String resourceOwner, String[] grantedScopes)
          Validate if the specified resource owner is allowed to grant the specified scope, when the grant endpoint is triggered.
 String validateRedirectURI(String clientId, URI redirectURI)
          Validate if one redirectURI is valid for specified clientId, when the authorization endpoint is triggered.
 void validateResourceOwner(String resourceOwner, String password)
          Validate if a resource owner is valid.

 

Method Detail

validateAdditionalParamsInAuthRequest

public void validateAdditionalParamsInAuthRequest(Map attributes)
                                           throws OAuth2ServletValidateException
With the exception of the validation of a resource owner, client, scope, redirect uri, and any additional parameters in an authorization request("oauth2/authorize")can be validated using this method.
Parameters:
attributes - Additional parameter key-values in authorize request
Throws:
OAuth2ServletValidateException

validateAdditionalParamsInDelegateAuthRequest

public void validateAdditionalParamsInDelegateAuthRequest(Map attributes)
                                                   throws OAuth2ServletValidateException
With the exception of the validation of a resource owner, client, scope, redirect uri, and any additional parameters in a grant request("oauth2/grant")can be validated using this method.
Parameters:
attributes - Additional parameter key-values in grant request
Throws:
OAuth2ServletValidateException

validateAdditionalParamsInTokenRequest

public void validateAdditionalParamsInTokenRequest(Map attributes)
                                            throws OAuth2ServletValidateException
With the exception of the validation of a resource owner, client, scope redirect uri, and any additional parameters in a token request("oauth2/token")can be validated using this method.
Parameters:
attributes - Additional parameter key-values in token request
Throws:
OAuth2ServletValidateException

validateClientCredentials

public void validateClientCredentials(String clientId,
                                      String password)
                               throws OAuth2ServletValidateException
Validate if one client credential is correct, when token endpoint is triggered.
Parameters:
clientId - client id
password - Password from client's request
Throws:
OAuth2ServletValidateException

validateGrantedScopes

public void validateGrantedScopes(String resourceOwner,
                                  String[] grantedScopes)
                           throws OAuth2ServletValidateException
Validate if the specified resource owner is allowed to grant the specified scope, when the grant endpoint is triggered.
Parameters:
resourceOwner - Resource owner name
grantedScopes - Scopes from user input
Throws:
OAuth2ServletValidateException

validateRedirectURI

public String validateRedirectURI(String clientId,
                                  URI redirectURI)
                           throws OAuth2ServletValidateException
Validate if one redirectURI is valid for specified clientId, when the authorization endpoint is triggered.
Parameters:
clientId -
redirectURI - from the user's input
Returns:
RedirectUri Returned if the input redirectURI is empty and only one predefined allowed redirect uri exists
Throws:
OAuth2ServletValidateException

validateResourceOwner

public void validateResourceOwner(String resourceOwner,
                                  String password)
                           throws OAuth2ServletValidateException
Validate if a resource owner is valid. Only applicable when OCSG is responsible for authenticating the resource owner.
Parameters:
resourceOwner - Resource owner name
password - Password from user's input
Throws:
OAuth2ServletValidateException

Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


Copyright © 2008, 2015, Oracle and/or its affiliates. All rights reserved.