Sha256: b0fc429fb175b76b68d88288b010bf9a1e67b0315f545e2ab84cf352f57fda5d

Contents?: true

Size: 1.15 KB

Versions: 12

Compression:

Stored size: 1.15 KB

Contents

module Rack
  module OAuth2
    module Server
      class Authorize
        module Extension
          class IdToken < Abstract::Handler
            class << self
              def response_type_for?(response_type)
                response_type == 'id_token'
              end
            end

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

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

              def error_params_location
                :fragment
              end
            end

            class Response < Authorize::Response
              include IdTokenResponse
              attr_required :id_token, :private_key

              def protocol_params_location
                :fragment
              end

              def protocol_params
                super.merge(
                  :id_token => jwt_string
                )
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
openid_connect-0.0.27 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.26 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.25 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.24 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.23 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.22 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.21 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.20 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.19 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.18 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.17 lib/rack/oauth2/server/authorize/extension/id_token.rb
openid_connect-0.0.16 lib/rack/oauth2/server/authorize/extension/id_token.rb