Sha256: 420d69f31f723709a4a3c7292db3692d612e56e5a2c7778e598ccb1202537d3b

Contents?: true

Size: 948 Bytes

Versions: 29

Compression:

Stored size: 948 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
              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

29 entries across 29 versions & 2 rubygems

Version Path
rack-oauth2-1.1.1 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.1.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.10 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.9 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.8 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-revibe-1.0.7 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.7 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.6 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.5 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.4 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.3 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.2 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.1 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-1.0.0 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-0.14.9 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-0.14.8 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-0.14.7 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-0.14.6 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-0.14.5 lib/rack/oauth2/server/authorize/extension/code_and_token.rb
rack-oauth2-0.14.4 lib/rack/oauth2/server/authorize/extension/code_and_token.rb