Sha256: 063aa84e3d3a66c3b8909a0c320d87392054b239798af6b043257e50c4cc3a6a

Contents?: true

Size: 1016 Bytes

Versions: 39

Compression:

Stored size: 1016 Bytes

Contents

module Rack
  module OAuth2
    module Server
      class Authorize
        module Extension
          class CodeAndToken < Abstract::Handler
            class << self
              def response_type_for?(response_type)
                response_type.split.sort == ['code', 'token']
              end
            end

            def _call(env)
              @request  = Request.new env
              @response = Response.new request
              super
            end

            class Request < Authorize::Token::Request
              include Server::Extension::PKCE::AuthorizationRequest

              def initialize(env)
                super
                @response_type = [:code, :token]
                attr_missing!
              end
            end

            class Response < Authorize::Token::Response
              attr_required :code

              def protocol_params
                super.merge(code: code)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
rack-oauth2-1.13.0.beta lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.12.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.11.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.10.1 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.10.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.9.3 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.9.2 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.9.1 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.9.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.8.2 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.8.1 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.8.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.7.1 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.7.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.6.4 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.6.3 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.6.2 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.6.1 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.6.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb