Sha256: 099618cf1e87daf2effb205ede16e2c6c8da60b6af78a140ac113078a0913087

Contents?: true

Size: 959 Bytes

Versions: 48

Compression:

Stored size: 959 Bytes

Contents

module Rack
  module OAuth2
    module Server
      class Authorize
        class Token < Abstract::Handler
          def call(env)
            @request  = Request.new env
            @response = Response.new request
            super
          end

          class Request < Authorize::Request
            def initialize(env)
              super
              @response_type = :token
              attr_missing!
            end

            def error_params_location
              :fragment
            end
          end

          class Response < Authorize::Response
            attr_required :access_token

            def protocol_params
              super.merge(
                access_token.token_response.delete_if do |k, v|
                  k == :refresh_token
                end
              )
            end

            def protocol_params_location
              :fragment
            end
          end
        end
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
rack-oauth2-1.5.1 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.5.0 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.4.0 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.3.1 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.3.0 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.2.3 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.2.2 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.2.1 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.2.0 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.1.1 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.1.0 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.10 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.9 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.8 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-revibe-1.0.7 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.7 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.6 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.5 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.4 lib/rack/oauth2/server/authorize/token.rb
rack-oauth2-1.0.3 lib/rack/oauth2/server/authorize/token.rb