Class: JwtApiAuth::AuthenticationController

Inherits:
ApplicationController show all
Defined in:
app/controllers/jwt_api_auth/authentication_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



13
14
15
# File 'app/controllers/jwt_api_auth/authentication_controller.rb', line 13

def resource
  @resource
end

Instance Method Details

#createObject



17
18
19
20
21
# File 'app/controllers/jwt_api_auth/authentication_controller.rb', line 17

def create
  create_refresh_token if refresh_token_enabled?

  render json: { token: token }, status: :created
end