class Doorkeeper::OAuth::TokenResponse
Attributes
Public Class Methods
Source
# File lib/doorkeeper/oauth/token_response.rb, line 10 def initialize(token) @token = token end
Public Instance Methods
Source
# File lib/doorkeeper/oauth/token_response.rb, line 14 def body @body ||= { "access_token" => token.plaintext_token, "token_type" => token.token_type, "expires_in" => token.expires_in_seconds, "refresh_token" => token.plaintext_refresh_token, "scope" => token.scopes_string, "created_at" => token.created_at.to_i, }.reject { |_, value| value.blank? } end
Source
# File lib/doorkeeper/oauth/token_response.rb, line 29 def headers { "Cache-Control" => "no-store, no-cache", "Content-Type" => "application/json; charset=utf-8", "Pragma" => "no-cache", } end