mumukit-auth 3.6.0 → 3.7.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
  SHA1:
3
- metadata.gz: b90f8c34b943bbdf1d0437289ba6d104498defcd
4
- data.tar.gz: fc136b27740aaf81f7a8bd650464e97f17b62a70
3
+ metadata.gz: f7112014b6bdb6ee999233edd32147258c8594a7
4
+ data.tar.gz: 4f02d55e1e0eecafdcf07cc2ac98a18b3054914b
5
5
  SHA512:
6
- metadata.gz: 4a034e8d1af30290a1c6626d81c8bc32316ced3126f850c0ed9f8b364d895bfd207d4c869933f99818957a4b7a274ade3a946448e350144da6d52613e5f8280d
7
- data.tar.gz: 8f08e07b29237cf34e54e324961d1f5b31c192e0a23f49cfe45b1de90f9cf9146e33afbd244d5808e221cf51103e0d9d8cb4d72293fbea8063f29e216c944096
6
+ metadata.gz: ade2a74bb06ef33cc42bf17cf343d22eef2ce9d8719630c5abdaeeef696cee14cd12786c86a3004378433b59d4d5b6557bf8a6b60debe49a836b08a53f90424f
7
+ data.tar.gz: 985a6ffddf29cd2599d924df36d9a1598d2b49bbc49030f0f56de3d39996ebc8a6fc8d3b2591735aacbe2cbd51bc02d507caa6c480da53a3610b33773379e847
@@ -13,7 +13,7 @@ module Mumukit::Auth
13
13
  end
14
14
 
15
15
  def uid
16
- @uid ||= jwt['email'] || jwt['sub']
16
+ @uid ||= jwt['uid'] || jwt['email'] || jwt['sub']
17
17
  end
18
18
 
19
19
  def permissions
@@ -36,12 +36,12 @@ module Mumukit::Auth
36
36
  new(env.dig('omniauth.auth', 'extra', 'raw_info') || {})
37
37
  end
38
38
 
39
- def self.encode_dummy_auth_header(metadata)
40
- 'dummy token ' + encode(metadata)
39
+ def self.encode_dummy_auth_header(uid, metadata)
40
+ 'dummy token ' + encode(uid, metadata)
41
41
  end
42
42
 
43
- def self.encode(metadata)
44
- new(aud: Mumukit::Auth.config.client_id, metadata: metadata).encode
43
+ def self.encode(uid, metadata)
44
+ new(aud: Mumukit::Auth.config.client_id, metadata: metadata, uid: uid).encode
45
45
  end
46
46
 
47
47
  def self.decode(encoded)
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Auth
3
- VERSION = '3.6.0'
3
+ VERSION = '3.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.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: 2017-01-02 00:00:00.000000000 Z
11
+ date: 2017-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler