yalla_auth_ruby_client 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed26f0ec4c3bbede37f49e7aa84537a4b0180521eae5ff18a5c0032dec3df0a5
4
- data.tar.gz: a3c298ece7075638dd70eede2c47e121731f184bf93393d3362599d8ec3dfa1c
3
+ metadata.gz: ab70317425f4b49d3352b51952c3340949387bbb6bc9ae69f2696b7b700f6525
4
+ data.tar.gz: 7b582e688b5d540541d28543170a7d8db02ffab6eb7c0e0dfdb64d8f040ba4ed
5
5
  SHA512:
6
- metadata.gz: 0a77fce078c6d7ceaf91942447c02c0de355a3b08139204cafaaf1320bb96f58a1e2ef38fbf080b05891c8f2b881b72d7ba7c5424e507efab105be3efdec6962
7
- data.tar.gz: 7d366e763ecd6473613db16c04f4fff32c0617788c2640888c7e19bb7d6ee6ee66dfe8db78a547ab90ec087e79fc91f7a4ce171ba0a86ac71d276fab76844f59
6
+ metadata.gz: 2b408066df1c6c2840ec349fc76a020a0a36ae272d7da9e20b2d8a223f00963742a0632e7ced3af25319917a21b42bcbf600fcb48c2661a1070f3fe774e48eba
7
+ data.tar.gz: ed309f61a98af05a2534adf95041fe0f6ac7eec3498e5fe63f39f2c9fd194614ad42d9ca3bdf19efafb66fb4e2ac6d45dc47edd75b542ea881690ed1cd06c20e
data/README.md CHANGED
@@ -91,6 +91,7 @@ to automatically validate a `token` parameter and store it in a signed cookie.
91
91
  # config/application.rb
92
92
  config.middleware.use YallaAuthRubyClient::AuthTokenMiddleware
93
93
  # or config.middleware.use YallaAuthRubyClient::UnsignedAuthTokenMiddleware
94
+ # override controller_authentication auth_token_cookie to cookie[:auth_token]
94
95
  ```
95
96
 
96
97
  ## Getting Started
@@ -11,5 +11,5 @@ Generator version: 7.12.0
11
11
  =end
12
12
 
13
13
  module OpenapiClient
14
- VERSION = '3.0.0'
14
+ VERSION = '3.0.2'
15
15
  end
@@ -5,8 +5,12 @@ module YallaAuthRubyClient
5
5
  redirect_to ENV["AUTH_URL"], allow_other_host: true
6
6
  end
7
7
 
8
+ def auth_token_cookie
9
+ cookies.signed[:auth_token]
10
+ end
11
+
8
12
  def authenticate_user
9
- token = cookies.signed[:auth_token]
13
+ token = auth_token_cookie
10
14
  return false unless token.present?
11
15
 
12
16
  begin
@@ -3,6 +3,7 @@ require 'rails/railtie'
3
3
  require 'yalla_auth_ruby_client/controller_authentication'
4
4
  require 'yalla_auth_ruby_client/api_controller_authentication'
5
5
  require 'yalla_auth_ruby_client/middleware/auth_token_middleware'
6
+ require 'yalla_auth_ruby_client/middleware/unsigned_auth_token_middleware'
6
7
 
7
8
  module YallaAuthRubyClient
8
9
  class Engine < ::Rails::Engine
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yalla_auth_ruby_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yalla auth openapi client
@@ -115,8 +115,8 @@ files:
115
115
  - spec/models/user_role_add_spec.rb
116
116
  - spec/models/user_spec.rb
117
117
  - spec/spec_helper.rb
118
- - yalla_auth_ruby_client-2.0.1.gem
119
- - yalla_auth_ruby_client-2.0.2.gem
118
+ - yalla_auth_ruby_client-3.0.0.gem
119
+ - yalla_auth_ruby_client-3.0.1.gem
120
120
  - yalla_auth_ruby_client.gemspec
121
121
  homepage: https://matrix.tn
122
122
  licenses:
Binary file
Binary file