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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f23b529d6d0228743ee68860d65607de8d445a1
4
- data.tar.gz: 9111141d9765007badb1616fb44e2d00e36b5e14
3
+ metadata.gz: 4f996970b436e6ab66475fb320b132809ba5c048
4
+ data.tar.gz: 92440b4ee31f5f9a5e029f22b69bea23180cc9c2
5
5
  SHA512:
6
- metadata.gz: bb9049221c29596a0089e3a0871897bc0f15858e78eec3462a27e91dc94cbc8d656fe047043b48851bd0fc9896d19d96d389ae3a7c298c7ddbe63c40a11ceb37
7
- data.tar.gz: 5fbce125973ca3be818302f08ffaf8d4e6d07a503b154b8a439a860af1d4ec0e0ad53b64c474223aa4e259a6f2d840cf71ba3fa93f586d43363627ab33155493
6
+ metadata.gz: a40806e2f692bf75844bacf84ad6c22f1fb69f260082b6f00d4f38ea4d445ab8c3ee971fe2734ea9ca38bafe874cb2257ef8506c5a389968cae362caaf3ac8ab
7
+ data.tar.gz: 11c38fdcb37d87c1d08764e08837a89da08018f2c541a7f85c4f3abc4d243463e85c4c2e4397fd4e359cba9e64c4d421faf6c28208824e156c10d0c46b6991e8
@@ -29,13 +29,13 @@ module Mumukit::Auth
29
29
  end
30
30
 
31
31
  class Student < Role
32
- parent :owner
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 :owner
38
+ parent :janitor
39
39
  end
40
40
  class Writer < Role
41
41
  parent :editor
@@ -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
- decode header.split(' ').last
59
+ header.split(' ').last
56
60
  end
57
61
 
58
62
  def self.decoded_secret
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Auth
3
- VERSION = '3.3.1'
3
+ VERSION = '3.4.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli