Sha256: e273b6aa0989f3f96bcc404203dd74c824d278ed3471253190cb2123d985652a

Contents?: true

Size: 689 Bytes

Versions: 8

Compression:

Stored size: 689 Bytes

Contents

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

8 entries across 8 versions & 1 rubygems

Version Path
doorkeeper-openid_connect-1.7.1 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.7.0 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.6.3 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.6.2 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.6.1 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.6.0 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.5.5 lib/doorkeeper/oauth/id_token_response.rb
doorkeeper-openid_connect-1.5.4 lib/doorkeeper/oauth/id_token_response.rb