mumukit-login 7.0.0 → 7.1.0

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
  SHA256:
3
- metadata.gz: b8200b72f9ae05c8235f7e53b81857ae3212a82fec4d301e5c994b817f5aa7a2
4
- data.tar.gz: 0165fab28ec7ae0f46b7364abbf9af0bbd96b0a2e03d765413632eaad21e6f40
3
+ metadata.gz: d9fcbf1a466edd39310327016d1523314fced42c96cc3f87578d9b925040a1ed
4
+ data.tar.gz: b6e0c3a610d0147c3928871ebad9dae3a493958c96668d4dd2d3cd8ffcfd3b63
5
5
  SHA512:
6
- metadata.gz: 14ee27ad4add9cfdc80b40fdabaf497f0db291ca0c3035b732a6ac220c87de0e78d1318f414e18b3c9a09958acfc8571b61b4cadda954ccadabb3a46c6d80807
7
- data.tar.gz: 2d4c7d91d203aa7fd4c37da0e48122cd364ebe0674c1cc5e9765cd00aa15aef18fb918b4ce3369c999826254633dfcb825b48e1eca10eacb4a3aa668e2236fd3
6
+ metadata.gz: 271b2d2d145d49b05559a9abe894277a1d89259e5d1ff07e29e95445780a04fb60ef76c0b4a05d2db5491a7f334dc8644e0165c56462b345a90761a246707570
7
+ data.tar.gz: 122b793af5999519061aa01431196a1095150cb6d6b38c590e8d97641b33acae688e619c96555094b95771382990c7bce776f4aae5cc01e13f580a488edab35f
@@ -1,7 +1,7 @@
1
1
  module Mumukit::Login::LoginControllerHelpers
2
2
 
3
3
  def login_current_user!
4
- mumukit_controller.write_cookie!(:login_organization, organization_name)
4
+ mumukit_controller.mucookie.write!(:login_organization, organization_name)
5
5
  origin_redirector.save_after_login_location!
6
6
  if current_user?
7
7
  origin_redirector.redirect_after_login!
@@ -9,7 +9,8 @@ class Mumukit::Login::Mucookie
9
9
  @controller.write_cookie! cookie_name(key),
10
10
  spec.merge(
11
11
  value: value.to_s,
12
- httponly: !!options[:httponly])
12
+ httponly: !!options[:httponly],
13
+ same_site: self.class.cookie_same_site)
13
14
  end
14
15
 
15
16
  def encrypt_and_write!(key, value, options={})
@@ -37,9 +38,19 @@ class Mumukit::Login::Mucookie
37
38
  end
38
39
 
39
40
  def spec
40
- { path: '/',
41
+ {
42
+ path: '/',
41
43
  expires: Mumukit::Login.config.mucookie_duration.days.since,
42
- domain: Mumukit::Login.config.mucookie_domain }
44
+ domain: Mumukit::Login.config.mucookie_domain
45
+ }
46
+ end
47
+
48
+ def self.cookie_same_site
49
+ if %w(RACK_ENV RAILS_ENV).any? { |it| ENV[it] == 'production' }
50
+ :none
51
+ else
52
+ :lax
53
+ end
43
54
  end
44
55
 
45
56
  private
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Login
3
- VERSION = '7.0.0'
3
+ VERSION = '7.1.0'
4
4
  end
5
5
  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.0.0
4
+ version: 7.1.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: 2019-07-08 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1.5'
89
+ version: '2.1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '1.5'
96
+ version: '2.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: jwt
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -290,7 +290,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.0.4
293
+ rubyforge_project:
294
+ rubygems_version: 2.7.7
294
295
  signing_key:
295
296
  specification_version: 4
296
297
  summary: Library for login mumuki requests