Sha256: 3184b8fedbe41928c361f908979283d4d4675775b355e18ae02b96d5df614564

Contents?: true

Size: 898 Bytes

Versions: 27

Compression:

Stored size: 898 Bytes

Contents

module Rack
  module OAuth2
    module Server
      class Token
        module Extension
          class JWT < Abstract::Handler
            GRANT_TYPE_URN = 'urn:ietf:params:oauth:grant-type:jwt-bearer'

            class << self
              def grant_type_for?(grant_type)
                grant_type == GRANT_TYPE_URN
              end
            end

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

            class Request < Token::Request
              attr_required :assertion
              attr_optional :client_id

              def initialize(env)
                super
                @grant_type = GRANT_TYPE_URN
                @assertion = params['assertion']
                attr_missing!
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
rack-oauth2-1.2.3 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.2.2 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.2.1 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.2.0 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.1.1 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.1.0 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.10 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.9 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.8 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-revibe-1.0.7 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.7 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.6 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.5 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.4 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.3 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.2 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.1 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-1.0.0 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-0.14.9 lib/rack/oauth2/server/token/extension/jwt.rb
rack-oauth2-0.14.8 lib/rack/oauth2/server/token/extension/jwt.rb