Sha256: 0d6148b0e1c883ea5000b536e1f9ee9d389de5354941abe69f74c3f435398aba

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

module Doorkeeper
  module OAuth
    class TokenResponse
      attr_accessor :token

      def initialize(token)
        @token = token
      end

      def body
        {
          'access_token'  => token.token,
          'token_type'    => token.token_type,
          'expires_in'    => token.expires_in,
          'refresh_token' => token.refresh_token,
          'scope'         => token.scopes_string
        }
      end

      def status
        :ok
      end

      def headers
        { 'Cache-Control' => 'no-store', 'Pragma' => 'no-cache', 'Content-Type' => 'application/json; charset=utf-8' }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
couchkeeper-0.6.7 lib/doorkeeper/oauth/token_response.rb