Sha256: 18628452b5cf6f24a0f353e0426b9ed30fb032068efd96a0c99c2e624fa858db

Contents?: true

Size: 687 Bytes

Versions: 8

Compression:

Stored size: 687 Bytes

Contents

module Rack
  module OAuth2
    module Server
      class Token
        class Password < Abstract::Handler

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

          class Request < Token::Request
            attr_reader :username, :password

            def initialize(env)
              super
              @grant_type = :password
              @username   = params['username']
              @password   = params['password']
            end

            def required_params
              super + [:username, :password]
            end
          end

        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-oauth2-0.2.2.1 lib/rack/oauth2/server/token/password.rb
rack-oauth2-0.2.2 lib/rack/oauth2/server/token/password.rb
rack-oauth2-0.2.1 lib/rack/oauth2/server/token/password.rb
rack-oauth2-0.2.0 lib/rack/oauth2/server/token/password.rb
rack-oauth2-0.1.0 lib/rack/oauth2/server/token/password.rb
rack-oauth2-0.0.9 lib/rack/oauth2/server/token/password.rb
rack-oauth2-0.0.8 lib/rack/oauth2/server/token/password.rb
rack-oauth2-0.0.7 lib/rack/oauth2/server/token/password.rb