Method: Tramway::Api::V1::UserTokensController#create
- Defined in:
- app/controllers/tramway/api/v1/user_tokens_controller.rb
#create ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/tramway/api/v1/user_tokens_controller.rb', line 4 def create if entity.present? && entity.authenticate(auth_params[:password]) token = auth_token render json: { auth_token: token, user: { email: @entity.email, uuid: @entity.uuid } }, status: :created else end end |