mumukit-login 7.5.1 → 7.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/login/helpers/authorization_helpers.rb +6 -0
- data/lib/mumukit/login/helpers/login_controller_helpers.rb +2 -2
- data/lib/mumukit/login/origin_redirector.rb +1 -3
- data/lib/mumukit/login/provider/base.rb +2 -1
- data/lib/mumukit/login/provider/cas.rb +9 -0
- data/lib/mumukit/login/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: a5f395ab9f8be2d3b5ab22e1969cd37395fad3aa33e3c153c0da2a2bac776741
|
4
|
+
data.tar.gz: 07fd22f1023d3059dc5849615139b7623f13b7030b2dfc422257cc28f283c63c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732e40f632086af5ad495ae2eccb9d2f4170b1914301053812af513a3483960878f26fe586439d46e8fc78f558afa75f714dad3d4c9b0e4dacb0082ad89c50db
|
7
|
+
data.tar.gz: 763e7ac95f0be2f0fceb942b1d3be5ef54e587d3c7a048c72b295c879b619bcc45d43bcda35bf78771051d324540dc3599a297c1d76b3f86026e4388edfe4152
|
@@ -15,5 +15,11 @@ module Mumukit::Login::AuthorizationHelpers
|
|
15
15
|
current_user.has_permission? role, authorization_slug
|
16
16
|
end
|
17
17
|
|
18
|
+
Mumukit::Auth::Roles::ROLES.each do |role|
|
19
|
+
define_method "authorize_#{role}!" do
|
20
|
+
authorize! role
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
18
24
|
required :authorization_slug
|
19
25
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
module Mumukit::Login::LoginControllerHelpers
|
2
|
+
delegate :redirect_after_logout!, to: :origin_redirector
|
2
3
|
|
3
4
|
def login_current_user!
|
4
5
|
mumukit_controller.mucookie.write!(:login_organization, organization_name)
|
@@ -19,8 +20,7 @@ module Mumukit::Login::LoginControllerHelpers
|
|
19
20
|
|
20
21
|
def logout_current_user!
|
21
22
|
destroy_current_user_session!
|
22
|
-
login_provider.
|
23
|
-
origin_redirector.redirect_after_logout!
|
23
|
+
login_provider.logout_current_user! self
|
24
24
|
end
|
25
25
|
|
26
26
|
private
|
@@ -29,6 +29,15 @@ module OmniAuth
|
|
29
29
|
result
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
def service_validate_url(service_url, ticket)
|
34
|
+
service_url = Addressable::URI.parse(service_url)
|
35
|
+
service_url.query_values = service_url.query_values.tap { |qs| qs.delete('ticket') }
|
36
|
+
cas_url + append_params(options.service_validate_url, {
|
37
|
+
service: service_url.to_s.sub(/\?$/, ''),
|
38
|
+
ticket: ticket
|
39
|
+
})
|
40
|
+
end
|
32
41
|
end
|
33
42
|
end
|
34
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -226,14 +226,14 @@ dependencies:
|
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '
|
229
|
+
version: '7.0'
|
230
230
|
type: :runtime
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: '
|
236
|
+
version: '7.0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: actionpack
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|