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
# File 'app/controllers/api_guard/tokens_controller.rb', line 8

def create
  @refresh_token.destroy
  create_token_and_set_header(current_resource, resource_name)
  render_success(message: 'Token refreshed successfully')
end