Class: ApiGuard::TokensController

Inherits:
ApplicationController show all
Defined in:
app/controllers/api_guard/tokens_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate_resource

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
# File 'app/controllers/api_guard/tokens_controller.rb', line 8

def create
  create_token_and_set_header(current_resource, resource_name)

  @refresh_token.destroy
  blacklist_token if ApiGuard.blacklist_token_after_refreshing

  render_success(message: I18n.t('api_guard.access_token.refreshed'))
end