Class: CzAuth::AuthenticationController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  resource = model.where(email: params[:email]).first
  @authenticated = perform_authentication_for(resource || model)
  render @authenticated ? 'create' : 'invalid'
end

#destroyObject



11
12
13
# File 'app/controllers/cz_auth/authentication_controller.rb', line 11

def destroy
  delete_session_cookie
end