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



80
81
82
83
84
85
86
87
# File 'lib/rack/oauth2/server/token.rb', line 80

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

#protocol_paramsObject



76
77
78
# File 'lib/rack/oauth2/server/token.rb', line 76

def protocol_params
  access_token.token_response
end