Sha256: a95a3ff76936e83d8a448f1a419e7a34253076cf999441d34606f9d96aa1a18a

Contents?: true

Size: 720 Bytes

Versions: 4

Compression:

Stored size: 720 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  module OAuth
    class IdTokenResponse < BaseResponse
      include OAuth::Helpers

      attr_accessor :pre_auth, :auth, :id_token

      def initialize(pre_auth, auth, id_token)
        @pre_auth = pre_auth
        @auth = auth
        @id_token = id_token
      end

      def redirectable?
        true
      end

      def redirect_uri
        Authorization::URIBuilder.uri_with_fragment(pre_auth.redirect_uri, redirect_uri_params)
      end

      private

      def redirect_uri_params
        {
          expires_in: auth.token.expires_in_seconds,
          state: pre_auth.state,
          id_token: id_token.as_jws_token
        }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
doorkeeper-openid_connect-1.7.5 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.7.4 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.7.3 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.7.2 lib/doorkeeper/oauth/id_token_response.rb