authentic-jwt 0.0.6 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -5
- data/authentic-jwt.gemspec +2 -0
- data/definitions/payload.proto +2 -1
- data/lib/authentic_jwt/authorizer.rb +5 -5
- data/lib/authentic_jwt/payload_pb.rb +1 -0
- data/lib/authentic_jwt/validator.rb +1 -1
- data/lib/authentic_jwt/version.rb +1 -1
- data/lib/tasks/build_definitions.rake +3 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c37cadf2c0760dce2bca4bc787feabcbe63b510
|
4
|
+
data.tar.gz: 1232ede6e42a09ca6ca44973f305738bf491467e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cccfc43d20d4c42392ffff4895c73b4e26f62e96f62ff57868983c38796deb77f22be12644f2c32eeb164224d51086cd45d38b54809d1f4ab306cb82681777e
|
7
|
+
data.tar.gz: e6ffda7f9486d80260f8ffea54ac2777b5292ee4ade49f7beee4e129625a22e2d5a803d762f5f44ad0814b3def89baf0cf40868c556a1f261cd20d2d081a1ca8
|
data/.rubocop.yml
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3
|
3
|
+
Exclude:
|
4
|
+
- "bin/**/*"
|
5
|
+
- "lib/authentic_jwt/payload_pb.rb"
|
6
|
+
- "vendor/**/*"
|
1
7
|
Style/StringLiterals:
|
2
8
|
EnforcedStyle: double_quotes
|
3
9
|
Style/WordArray:
|
@@ -32,11 +38,6 @@ Style/IndentHash:
|
|
32
38
|
Enabled: false
|
33
39
|
Style/NumericLiterals:
|
34
40
|
Enabled: false
|
35
|
-
AllCops:
|
36
|
-
TargetRubyVersion: 2.2
|
37
|
-
Exclude:
|
38
|
-
- 'bin/**/*'
|
39
|
-
- 'vendor/**/*'
|
40
41
|
Style/ExtraSpacing:
|
41
42
|
Enabled: false
|
42
43
|
Style/DotPosition:
|
data/authentic-jwt.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
|
2
3
|
lib = File.expand_path("../lib", __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require "authentic_jwt/version"
|
@@ -27,4 +28,5 @@ Gem::Specification.new do |spec|
|
|
27
28
|
spec.add_development_dependency "pry"
|
28
29
|
spec.add_development_dependency "rake"
|
29
30
|
spec.add_development_dependency "rspec"
|
31
|
+
spec.add_development_dependency "rubocop"
|
30
32
|
end
|
data/definitions/payload.proto
CHANGED
@@ -36,11 +36,11 @@ module AuthenticJwt
|
|
36
36
|
|
37
37
|
def calculate_acceptable_roles(scope:)
|
38
38
|
return [] unless scope
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
case scope
|
40
|
+
when "read" then AuthenticJwt::Role.read
|
41
|
+
when "write" then AuthenticJwt::Role.write
|
42
|
+
else raise ArgumentError
|
43
|
+
end
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -6,6 +6,7 @@ require 'google/protobuf'
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
7
|
add_message "AuthenticJwt.Payload" do
|
8
8
|
optional :sub, :string, 2
|
9
|
+
optional :username, :string, 9
|
9
10
|
repeated :roles, :enum, 10, "AuthenticJwt.Payload.Role"
|
10
11
|
optional :name, :string, 11
|
11
12
|
optional :email, :string, 12
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authentic-jwt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Authentic Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description: Client authentication for Authentic Apps
|
126
140
|
email:
|
127
141
|
- rubygems@kotiri.com
|
@@ -151,6 +165,7 @@ files:
|
|
151
165
|
- lib/authentic_jwt/role.rb
|
152
166
|
- lib/authentic_jwt/validator.rb
|
153
167
|
- lib/authentic_jwt/version.rb
|
168
|
+
- lib/tasks/build_definitions.rake
|
154
169
|
homepage: https://github.com/mytours/authentic-jwt
|
155
170
|
licenses: []
|
156
171
|
metadata: {}
|