Sha256: 655c92b352059a2da485b9737694caa22ed38183bf5bd833e09a11090d1c5e4b

Contents?: true

Size: 896 Bytes

Versions: 9

Compression:

Stored size: 896 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  module OpenidConnect
    module OAuth
      module PasswordAccessTokenRequest
        attr_reader :nonce

        if Gem.loaded_specs['doorkeeper'].version >= Gem::Version.create('5.5.1')
          def initialize(server, client, credentials, resource_owner, parameters = {})
            super
            @nonce = parameters[:nonce]
          end
        else
          def initialize(server, client, resource_owner, parameters = {})
            super
            @nonce = parameters[:nonce]
          end
        end

        private

        def after_successful_response
          id_token = Doorkeeper::OpenidConnect::IdToken.new(access_token, nonce)
          @response.id_token = id_token
          super
        end
      end
    end
  end

  OAuth::PasswordAccessTokenRequest.prepend OpenidConnect::OAuth::PasswordAccessTokenRequest
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
doorkeeper-openid_connect-1.8.10 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.8 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.7 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.6 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.5 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.4 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.3 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.2 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb
doorkeeper-openid_connect-1.8.1 lib/doorkeeper/openid_connect/oauth/password_access_token_request.rb