isaca-rails 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isaca/rails/authentication.rb +21 -14
- data/lib/isaca/rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d06cecd0537c57b9972bccd8f147bd4e5dd5827aa8a139960c84dd6c9545bb29
|
4
|
+
data.tar.gz: 2dacf9bbc7b3e89e343952aec7aa937549f93e49dc8c8aeeb9560716d9fcc7c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa885ba20b5b7d46ecc6036fff7d3577e60b95dcd44eba908f87a85cdc9e421acf41895a4a862019cdd38327bdc3fedad76c004441d410dcbf58d23a72b0e5f6
|
7
|
+
data.tar.gz: e1397c6576e41eae69fa3eabb4213d40a3174f409c4027eadef29b11dc8d6e837647fdb44054034560ba588c544b89dc4ad3b92bc27da6f913bce729bc6c2e9c
|
@@ -15,22 +15,29 @@ module Isaca
|
|
15
15
|
#
|
16
16
|
# @return nil
|
17
17
|
def authenticate_isaca_user
|
18
|
-
|
19
|
-
if
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
18
|
+
begin
|
19
|
+
if user_signed_in?
|
20
|
+
if request.path != user_consent_path && redirect_for_consent?
|
21
|
+
session[:after_sign_in_path] = request.fullpath if request.get? && request.format.html?
|
22
|
+
flash.alert = t('isaca.rails.user_consent.consent_required')
|
23
|
+
redirect_to user_consent_path
|
24
|
+
end
|
25
|
+
else
|
26
|
+
session[:after_sign_in_path] = request.fullpath if request.get?
|
27
|
+
flash.alert = t('isaca.rails.sessions.sign_in_required')
|
28
|
+
|
29
|
+
respond_to do |format|
|
30
|
+
format.html {redirect_to sign_in_path}
|
31
|
+
format.json do
|
32
|
+
render json: {error: t('isaca.rails.sessions.sign_in_required')}.to_json, status: :unauthorized
|
33
|
+
end
|
32
34
|
end
|
33
35
|
end
|
36
|
+
rescue Isaca::ServiceError => e
|
37
|
+
cookies.delete('Token', domain: :all) if token_cookie_exists?
|
38
|
+
@current_isaca_user = nil
|
39
|
+
reset_session
|
40
|
+
redirect_to sign_in_path, alert: "ISACA Service Error: #{e.message}"
|
34
41
|
end
|
35
42
|
end
|
36
43
|
|
data/lib/isaca/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isaca-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Orahood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sass-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|