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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6a959a8396661244a82b062b3c845bdecd37edf
4
- data.tar.gz: 9beedd0588c44827c8d7836bcad72074c79d47c4
3
+ metadata.gz: 6c37cadf2c0760dce2bca4bc787feabcbe63b510
4
+ data.tar.gz: 1232ede6e42a09ca6ca44973f305738bf491467e
5
5
  SHA512:
6
- metadata.gz: 97261b6075c5f1de47486b02b7be724bc891fc58e51459b6c94be3d55832826182ee1ccad481fb266613331659c33d69e76555f005907f2c8838978b31835dbf
7
- data.tar.gz: 4cb551c7fbae0417b48804cd4eacab190132106a9d73d70d6b73a1e61a1602cf19e7b60c79fee25de785f5f3780b9972679a9a1668ec170bf1fca25928135fcf
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:
@@ -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
@@ -62,7 +62,8 @@ message Payload {
62
62
  // int32 nbf = 5;
63
63
  // int32 iat = 6;
64
64
  // string jti = 7;
65
- reserved 3 to 9;
65
+ reserved 3 to 8;
66
+ string username = 9;
66
67
  repeated Role roles = 10;
67
68
  string name = 11;
68
69
  string email = 12;
@@ -36,11 +36,11 @@ module AuthenticJwt
36
36
 
37
37
  def calculate_acceptable_roles(scope:)
38
38
  return [] unless scope
39
- case scope
40
- when "read" then AuthenticJwt::Role.read
41
- when "write" then AuthenticJwt::Role.write
42
- else raise ArgumentError
43
- end
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
@@ -53,7 +53,7 @@ module AuthenticJwt
53
53
  end
54
54
  end
55
55
 
56
- # TODO bypass this step
56
+ # TODO: bypass this step
57
57
  json = JSON.dump(raw)
58
58
 
59
59
  begin
@@ -1,3 +1,3 @@
1
1
  module AuthenticJwt
2
- VERSION = "0.0.6".freeze
2
+ VERSION = "1.0.0"
3
3
  end
@@ -0,0 +1,3 @@
1
+ task :build_definitions do
2
+ `protoc --ruby_out=lib/authentic_jwt -I definitions definitions/payload.proto`
3
+ end
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.6
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-02-11 00:00:00.000000000 Z
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: {}