Class: Devise::Oauth2Providable::TokensController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Devise::Oauth2Providable::TokensController
- Defined in:
- app/controllers/devise/oauth2_providable/tokens_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/devise/oauth2_providable/tokens_controller.rb', line 5 def create @refresh_token = oauth2_current_refresh_token || oauth2_current_client.refresh_tokens.create!(:user => current_user) @access_token = @refresh_token.access_tokens.create!(:client => oauth2_current_client, :user => current_user) render :json => @access_token.token_response end |