Class: Rack::OAuth2::Server::Token::Response

Inherits:
Abstract::Response show all
Defined in:
lib/rack/oauth2/server/token.rb

Instance Method Summary collapse

Methods inherited from Abstract::Response

#initialize

Constructor Details

This class inherits a constructor from Rack::OAuth2::Server::Abstract::Response

Instance Method Details

#finishObject



69
70
71
72
73
74
75
76
# File 'lib/rack/oauth2/server/token.rb', line 69

def finish
  attr_missing!
  write MultiJson.dump(Util.compact_hash(protocol_params))
  header['Content-Type'] = 'application/json'
  header['Cache-Control'] = 'no-store'
  header['Pragma'] = 'no-cache'
  super
end

#protocol_paramsObject



65
66
67
# File 'lib/rack/oauth2/server/token.rb', line 65

def protocol_params
  access_token.token_response
end