Class: Skydrive::ApiKeysController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Skydrive::ApiKeysController
- Defined in:
- app/controllers/skydrive/api_keys_controller.rb
Instance Method Summary collapse
Instance Method Details
#oauth2_token ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/controllers/skydrive/api_keys_controller.rb', line 3 def oauth2_token api_key = ApiKey.trade_oauth_code_for_access_token(params['code']) if api_key render json: { api_key: api_key }, status: 201 else render json: {"message" => "invalid code"}, status: 400 end end |