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 +4 -4
- data/lib/mumukit/auth/token.rb +5 -5
- data/lib/mumukit/auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7112014b6bdb6ee999233edd32147258c8594a7
|
4
|
+
data.tar.gz: 4f02d55e1e0eecafdcf07cc2ac98a18b3054914b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ade2a74bb06ef33cc42bf17cf343d22eef2ce9d8719630c5abdaeeef696cee14cd12786c86a3004378433b59d4d5b6557bf8a6b60debe49a836b08a53f90424f
|
7
|
+
data.tar.gz: 985a6ffddf29cd2599d924df36d9a1598d2b49bbc49030f0f56de3d39996ebc8a6fc8d3b2591735aacbe2cbd51bc02d507caa6c480da53a3610b33773379e847
|
data/lib/mumukit/auth/token.rb
CHANGED
@@ -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)
|
data/lib/mumukit/auth/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|