All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.blade.oauth2.validator.AuthorizationCodeValidator Maven / Gradle / Ivy

/**
 * 
 */
package com.blade.oauth2.validator;

import com.blade.oauth2.OAuth;
import com.blade.oauth2.base.validator.OAuthBaseValidator;
import com.blade.web.http.Request;

/**
 * Validator that checks for the required fields in an OAuth Token request with the Authorization Code grant type.
 * This validator enforces client authentication either through basic authentication or body parameters.
 * 
 * @author BruceZCQ [[email protected]]
 * @version
 */
public class AuthorizationCodeValidator extends OAuthBaseValidator {

    public AuthorizationCodeValidator() {
    	//Value MUST be set to "authorization_code".
        requiredParams.add(OAuth.OAUTH_GRANT_TYPE);
        requiredParams.add(OAuth.OAUTH_CODE);
        requiredParams.add(OAuth.OAUTH_REDIRECT_URI);
        requiredParams.add(OAuth.OAUTH_CLIENT_ID);
        enforceClientAuthentication = true;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy