code: public static boolean validateAuthorizationRequest(AuthRequestDto authRequestDto, OAuthApplicationDto oAuthApplicationDto) throws OAuthException {
          if (StringUtils.isNotBlank(oAuthApplicationDto.getClientId()) && oAuthApplicationDto.getClientId().equals(authRequestDto.getClientId())) {
              try {
                  String decodedRedirectUri = java.net.URLDecoder.decode(authRequestDto.getRedirectUri(), "UTF-8");
                  if (StringUtils.isNotBlank(oAuthApplicationDto.getRedirectUri()) && oAuthApplicationDto.getRedirectUri().equals(decodedRedirectUri)) {
                      return true;
                  } else {
                      _logger.info("Request Redirect URI '" + authRequestDto.getRedirectUri() + "' mismatch");
                      throw new OAuthException(ResponseCodes.INVALID_OR_MISSING_REDIRECT_URI, HttpResponseStatus.BAD_REQUEST);
                  }
              } catch (UnsupportedEncodingException e) {
                  _logger.info("Request Redirect URI '" + authRequestDto.getRedirectUri() + "' mismatch");
                  throw new OAuthException(ResponseCodes.INVALID_OR_MISSING_REDIRECT_URI, HttpResponseStatus.BAD_REQUEST);
              }
          } else {
              _logger.info("Request Client ID '" + authRequestDto.getClientId() + "' mismatch");
              throw new OAuthException(ResponseCodes.INVALID_OR_MISSING_CLIENT_ID, HttpResponseStatus.BAD_REQUEST);
          }
      }
docs: Validates Authorization Request
  @param authRequestDto        Given Application DTO properties
  @param oAuthApplicationDto   Expected Application DTO properties
  @return Boolean or Exception based on Validation
  @throws OAuthException   Exception related to OAuth