Sha256: 916da8532758bf94032b738b4f7e661e2b2721a8058179bcaa4a99c564d5452c

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

module IdTokenSupport
  def self.included(klass)
    klass.send :attr_optional, :id_token
    klass.class_eval do
      def protocol_params_with_id_token
        protocol_params_without_id_token.merge(
          :id_token => id_token.try(:to_jwt)
        )
      end
      alias_method_chain :protocol_params, :id_token
    end
  end
end

class Rack::OAuth2::Server::Token::Response
  include TokenWithIdToken
end

class Rack::OAuth2::Server::Authorize::Token::Response
  include TokenWithIdToken
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openid_connect-0.0.8 lib/rack/oauth2/server/id_token_support.rb