Sha256: 06476e867c2db1e0c444438e5810fb51a71a433fcbcfe969cdd03ffb4c4045f8

Contents?: true

Size: 469 Bytes

Versions: 5

Compression:

Stored size: 469 Bytes

Contents

module Doorkeeper
  module OpenidConnect
    module OAuth
      module TokenResponse
        attr_accessor :id_token

        def body
          if token.includes_scope? 'openid'
            super
              .merge(id_token: id_token.try(:as_jws_token))
              .reject { |_, value| value.blank? }
          else
            super
          end
        end
      end
    end
  end

  OAuth::TokenResponse.send :prepend, OpenidConnect::OAuth::TokenResponse
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
doorkeeper-openid_connect-1.3.0 lib/doorkeeper/openid_connect/oauth/token_response.rb
doorkeeper-openid_connect-1.2.0 lib/doorkeeper/openid_connect/oauth/token_response.rb
doorkeeper-openid_connect-1.1.2 lib/doorkeeper/openid_connect/oauth/token_response.rb
doorkeeper-openid_connect-1.1.1 lib/doorkeeper/openid_connect/oauth/token_response.rb
doorkeeper-openid_connect-1.1.0 lib/doorkeeper/openid_connect/oauth/token_response.rb