2
0

Enable OAuth PKCE Extension (#31129)

This commit is contained in:
Emelia Smith
2024-07-26 10:53:10 +02:00
committed by GitHub
parent 3793c845c9
commit 693d9b03ed
10 changed files with 164 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
# frozen_string_literal: true
module OauthPreAuthorizationExtension
extend ActiveSupport::Concern
included do
validate :code_challenge_method_s256, error: Doorkeeper::Errors::InvalidCodeChallengeMethod
end
def validate_code_challenge_method_s256
code_challenge.blank? || code_challenge_method == 'S256'
end
end