mumukit-auth 3.3.1 → 3.4.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/role.rb +2 -2
- data/lib/mumukit/auth/token.rb +5 -1
- data/lib/mumukit/auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f996970b436e6ab66475fb320b132809ba5c048
|
4
|
+
data.tar.gz: 92440b4ee31f5f9a5e029f22b69bea23180cc9c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a40806e2f692bf75844bacf84ad6c22f1fb69f260082b6f00d4f38ea4d445ab8c3ee971fe2734ea9ca38bafe874cb2257ef8506c5a389968cae362caaf3ac8ab
|
7
|
+
data.tar.gz: 11c38fdcb37d87c1d08764e08837a89da08018f2c541a7f85c4f3abc4d243463e85c4c2e4397fd4e359cba9e64c4d421faf6c28208824e156c10d0c46b6991e8
|
data/lib/mumukit/auth/role.rb
CHANGED
@@ -29,13 +29,13 @@ module Mumukit::Auth
|
|
29
29
|
end
|
30
30
|
|
31
31
|
class Student < Role
|
32
|
-
parent :
|
32
|
+
parent :teacher
|
33
33
|
end
|
34
34
|
class Teacher < Role
|
35
35
|
parent :headmaster
|
36
36
|
end
|
37
37
|
class Headmaster < Role
|
38
|
-
parent :
|
38
|
+
parent :janitor
|
39
39
|
end
|
40
40
|
class Writer < Role
|
41
41
|
parent :editor
|
data/lib/mumukit/auth/token.rb
CHANGED
@@ -51,8 +51,12 @@ module Mumukit::Auth
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.decode_header(header)
|
54
|
+
decode extract_from_header header
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.extract_from_header(header)
|
54
58
|
raise Mumukit::Auth::InvalidTokenError.new('missing authorization header') if header.nil?
|
55
|
-
|
59
|
+
header.split(' ').last
|
56
60
|
end
|
57
61
|
|
58
62
|
def self.decoded_secret
|
data/lib/mumukit/auth/version.rb
CHANGED