mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 00:54:02 -05:00
14 lines
332 B
Ruby
14 lines
332 B
Ruby
# 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
|