Method: ApiGuard::TokensController#create

Defined in:
app/controllers/api_guard/tokens_controller.rb

#createObject



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

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