integration_pal 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de0868d260b1c8d55bd3015f9edd5e13583f8881
|
4
|
+
data.tar.gz: 88acaaebcfd357a5ee94f12323495d3d56695eb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd103d50053894e2bc7794de0e82838573cf9b69270efcda721525b10dedc89026891b62decd9c08365d7654be77255ac8ac0f0bfeca5ccbad82348341d8ab0d
|
7
|
+
data.tar.gz: 8068c9446f59e8eb8a3afcfbce33d53fbdc667aeabb842ee2004eb851c4aef74c6179c373f457651f5d25760a08cc51a532691b65ad00859bcac73639924895a
|
@@ -1,13 +1,9 @@
|
|
1
1
|
module IntegrationPal
|
2
2
|
class ApplicationController < ActionController::Base
|
3
3
|
protect_from_forgery with: :exception
|
4
|
-
before_action :
|
4
|
+
before_action :authenticate!
|
5
5
|
|
6
|
-
def
|
7
|
-
return false
|
8
|
-
end
|
9
|
-
|
10
|
-
def require_user
|
6
|
+
def authenticate!
|
11
7
|
# pretend to be logged in; you can still go directly to /login if you want to test the SAML flow
|
12
8
|
session[:saml_username] ||= ENV['USER'] if Rails.env.in?(%w(development test))
|
13
9
|
redirect_to saml2_login_url unless session[:saml_username]
|
@@ -38,10 +38,7 @@ module IntegrationPal
|
|
38
38
|
end
|
39
39
|
|
40
40
|
protect_from_forgery except: [:create]
|
41
|
-
|
42
|
-
def skip_authentication?
|
43
|
-
true
|
44
|
-
end
|
41
|
+
skip_before_action :authenticate!
|
45
42
|
|
46
43
|
def new
|
47
44
|
authn_request = self.class.sp_metadata.initiate_authn_request(self.class.idp_metadata)
|
@@ -62,6 +59,11 @@ module IntegrationPal
|
|
62
59
|
redirect_to root_url
|
63
60
|
end
|
64
61
|
|
62
|
+
def logout
|
63
|
+
reset_session
|
64
|
+
redirect_to root_url
|
65
|
+
end
|
66
|
+
|
65
67
|
def metadata
|
66
68
|
render xml: self.class.sp_metadata.to_xml
|
67
69
|
end
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: integration_pal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Tanner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|