Class: Contrib::Auth::AuthenticationController

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

Instance Method Summary collapse

Instance Method Details

#certificatesObject



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_passwordObject



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_passwordObject



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_passwordObject



4
5
6
7
8
9
# File 'app/controllers/contrib/auth/authentication_controller.rb', line 4

def 
  @response = Contrib::Auth.api.(
    params[:email_or_username],
    params[:password]
  )
end

#sign_up_with_email_or_username_and_passwordObject



19
20
21
22
23
24
# File 'app/controllers/contrib/auth/authentication_controller.rb', line 19

def 
  @response = Contrib::Auth.api.(
    params[:email_or_username],
    params[:password]
  )
end