Class: Isaca::Rails::SessionsController
Instance Method Summary
collapse
#authorize_isaca_user, #claim_symbols, #user_has_privilege?
#authenticate, #authenticate_isaca_user, #current_isaca_user, #isaca_requires_consent?, #isaca_sign_out, #redirect_after_sign_in_or, #redirect_for_consent?, #user_signed_in?
Instance Method Details
#create ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'app/controllers/isaca/rails/sessions_controller.rb', line 6
def create
begin
respond_to do |format|
format.html do
flash.notice = t('isaca.rails.sessions.sign_in_success')
redirect_after_sign_in_or root_path
end
format.json do
render json: current_isaca_user.to_json
end
end
rescue Isaca::ServiceError => e
respond_to do |format|
format.html do
flash.alert = e.message
redirect_to sign_in_path
end
format.json do
render json: { error: e.message }
end
end
end
end
|
#destroy ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'app/controllers/isaca/rails/sessions_controller.rb', line 35
def destroy
isaca_sign_out
respond_to do |format|
format.html do
flash.notice = t('isaca.rails.sessions.sign_out_success')
redirect_to root_path
end
format.json do
head :ok
end
end
end
|
#new ⇒ Object
2
3
4
|
# File 'app/controllers/isaca/rails/sessions_controller.rb', line 2
def new
@form_object = Session::SignIn::FormObject.new
end
|