oauth_pre_authorization_extension.rb 332 B

12345678910111213
  1. # frozen_string_literal: true
  2. module OauthPreAuthorizationExtension
  3. extend ActiveSupport::Concern
  4. included do
  5. validate :code_challenge_method_s256, error: Doorkeeper::Errors::InvalidCodeChallengeMethod
  6. end
  7. def validate_code_challenge_method_s256
  8. code_challenge.blank? || code_challenge_method == 'S256'
  9. end
  10. end