jwt_auth_token 1.2.9 → 1.3.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: 955b0c9a2482c01319cbf8d85a3776b6c9a02de1
4
- data.tar.gz: 6f16dab2b8df8a61c3ab4dbc3ec4cc3df303691b
3
+ metadata.gz: ee372a6ab38f52e3521203ae5974de7e853897f9
4
+ data.tar.gz: e7e6ff8ec4b8740803f73967717b95854a2d9641
5
5
  SHA512:
6
- metadata.gz: 8ba80f180bb577885970104bb8a79d7590bc9325bb57bd24d92671dd37640fbf1fb19baa70291791ca194d974e59c9bc0a5ec6b4e7cbc5c31f2e431c88eb46ad
7
- data.tar.gz: 4223d3e1a2dc9a228b3b6851663e6915c252af33e7e92c4aaf92f05744548a3c22f34c9a75c00efb12b4db85d69ff1782f7627d37bb8f41ff2f50be7cf86d608
6
+ metadata.gz: 35c191ea6a735fb83d66a49cacca8aa3c68c8b70584564863a3756e4e9146c2583cc14226ab6a5c75ae7640c028dced72b03d63e017eea88aca9941c35715904
7
+ data.tar.gz: 5be8685228d6fd55ed08ce185568b345bebf8178285b5b0724df09687d280e477b98fa64854a8670af14a27b530a0e3c707b6cd6e9f401b9f45c06d73f5640af
@@ -19,8 +19,18 @@ module JwtAuthToken
19
19
  @_jwt_header_name ||= "embibe-token"
20
20
  end
21
21
 
22
+ def jwt_cookie_name
23
+ return @_jwt_cookie_name if @_jwt_cookie_name
24
+ @_jwt_cookie_name = jwt_header_name
25
+ if !Rails.env.production?
26
+ @_jwt_cookie_name = "#{Rails.env}-#{jwt_header_name}"
27
+ end
28
+ @_jwt_cookie_name
29
+ # @_jwt_cookie_name ||= "#{Rails.env}-#{jwt_header_name}"
30
+ end
31
+
22
32
  def jwt_header_token
23
- @_jwt_header_token ||= request.cookies[jwt_header_name] || request.headers[jwt_header_name] rescue nil
33
+ @_jwt_header_token ||= request.cookies[jwt_cookie_name] || request.headers[jwt_header_name] rescue nil
24
34
  end
25
35
 
26
36
  def is_jwt_valid_token?
data/lib/router_helper.rb CHANGED
@@ -38,8 +38,8 @@ module RouterHelper
38
38
  horizontal: {url: "http://horizontal-microservice", port: 80},
39
39
  content: {url: "http://content-microservice", port: 80},
40
40
  mocktest: {url: "http://mocktest-microservice", port: 80},
41
- practice: {url: "http://practice-microservice", port: 9297},
42
- payment: {url: "http://payment-microservice", port: 9297}
41
+ practice: {url: "http://practice-microservice", port: 80},
42
+ payment: {url: "http://payment-microservice", port: 80}
43
43
  }
44
44
  end
45
45
 
@@ -49,8 +49,8 @@ module RouterHelper
49
49
  horizontal: {url: "http://horizontal-microservice", port: 80},
50
50
  content: {url: "http://content-microservice", port: 80},
51
51
  mocktest: {url: "http://mocktest-microservice", port: 80},
52
- practice: {url: "http://practice-microservice", port: 9297},
53
- payment: {url: "http://payment-microservice", port: 9297}
52
+ practice: {url: "http://practice-microservice", port: 80},
53
+ payment: {url: "http://payment-microservice", port: 80}
54
54
  }
55
55
  end
56
56
 
@@ -60,12 +60,12 @@ module RouterHelper
60
60
 
61
61
  def services_production_urls
62
62
  @_services_production_urls ||= {
63
- user: {url: "http://user-microservice", port: 9297},
64
- horizontal: {url: "http://horizontal-microservice", port: 9297},
65
- content: {url: "http://content-microservice", port: 9297},
66
- mocktest: {url: "http://mocktest-microservice", port: 9297},
67
- practice: {url: "http://practice-microservice", port: 9297},
68
- payment: {url: "http://payment-microservice", port: 9297}
63
+ user: {url: "http://user-microservice", port: 80},
64
+ horizontal: {url: "http://horizontal-microservice", port: 80},
65
+ content: {url: "http://content-microservice", port: 80},
66
+ mocktest: {url: "http://mocktest-microservice", port: 80},
67
+ practice: {url: "http://practice-microservice", port: 80},
68
+ payment: {url: "http://payment-microservice", port: 80}
69
69
  }
70
70
 
71
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt_auth_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Afzal Lakdawala