Class: Contrib::Auth::AuthenticationController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- Contrib::Auth::AuthenticationController
- Defined in:
- app/controllers/contrib/auth/authentication_controller.rb
Instance Method Summary collapse
- #certificates ⇒ Object
- #change_password ⇒ Object
- #reset_password ⇒ Object
- #sign_in_with_password ⇒ Object
- #sign_up_with_email_or_username_and_password ⇒ Object
Instance Method Details
#certificates ⇒ Object
34 35 36 |
# File 'app/controllers/contrib/auth/authentication_controller.rb', line 34 def certificates render json: Contrib::Auth.api.certificates, status: :ok end |
#change_password ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/controllers/contrib/auth/authentication_controller.rb', line 26 def change_password @response = Contrib::Auth.api.change_password( params[:id_token], params[:password], params[:password_confirmation], ) end |
#reset_password ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/contrib/auth/authentication_controller.rb', line 11 def reset_password @response = Contrib::Auth::api.reset_password( params[:email_or_username] ) render json: {}, status: :ok end |
#sign_in_with_password ⇒ Object
4 5 6 7 8 9 |
# File 'app/controllers/contrib/auth/authentication_controller.rb', line 4 def sign_in_with_password @response = Contrib::Auth.api.sign_in_with_password( params[:email_or_username], params[:password] ) end |
#sign_up_with_email_or_username_and_password ⇒ Object
19 20 21 22 23 24 |
# File 'app/controllers/contrib/auth/authentication_controller.rb', line 19 def sign_up_with_email_or_username_and_password @response = Contrib::Auth.api.sign_up_with_email_and_password( params[:email_or_username], params[:password] ) end |