class Doorkeeper::OAuth::TokenResponse
Attributes
token[RW]
Public Class Methods
new(token)
click to toggle source
# File lib/doorkeeper/oauth/token_response.rb, line 6 def initialize(token) @token = token end
Public Instance Methods
body()
click to toggle source
# File lib/doorkeeper/oauth/token_response.rb, line 10 def body { 'access_token' => token.token, 'token_type' => token.token_type, 'expires_in' => token.expires_in_seconds, 'refresh_token' => token.refresh_token, 'scope' => token.scopes_string, 'created_at' => token.created_at.to_i }.reject { |_, value| value.blank? } end
headers()
click to toggle source
# File lib/doorkeeper/oauth/token_response.rb, line 25 def headers { 'Cache-Control' => 'no-store', 'Pragma' => 'no-cache', 'Content-Type' => 'application/json; charset=utf-8' } end
status()
click to toggle source
# File lib/doorkeeper/oauth/token_response.rb, line 21 def status :ok end