session-validator-client 5.1.0 → 5.1.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 +4 -4
- data/.github/workflows/ruby.yml +3 -3
- data/.gitignore +1 -0
- data/Makefile +7 -0
- data/README.md +19 -16
- data/docker-compose.yml +6 -0
- data/session-validator-client.gemspec +1 -1
- metadata +5 -3
- /data/{.env → .env.example} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6242bc6b7c02d62ac8bceff4c620ae8836bd1935a23df95a839cd84b8b5c1934
|
4
|
+
data.tar.gz: ca9638fab46429d9df13658fd728cbabc0773998d61554dbb00ac7aa397f10fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad5b41199775adc15dbaa11e72b169a2651fb352a7c4ca279abc93e14c72f74b55c6a7618c8cf6714936b3c6cce7ad6bff1222511e1dc4ca640aacacbd1bffd6
|
7
|
+
data.tar.gz: b1a9477a886cbc02cd11d04cd27c18385a18970cb48be418b1addec74514823ec34f35d35f73a7d4c632cfdbb532f461cc3414fc8844e8eceefde86c3d64f21b
|
data/.github/workflows/ruby.yml
CHANGED
@@ -7,10 +7,10 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby-versions: ['2.6', '2.7', '3.0']
|
10
|
+
ruby-versions: ['2.6', '2.7', '3.0', '3.2']
|
11
11
|
|
12
12
|
steps:
|
13
|
-
- uses: actions/checkout@
|
13
|
+
- uses: actions/checkout@v4
|
14
14
|
- uses: ruby/setup-ruby@v1
|
15
15
|
with:
|
16
16
|
ruby-version: ${{ matrix.ruby-versions }}
|
@@ -28,4 +28,4 @@ jobs:
|
|
28
28
|
gem build *.gemspec
|
29
29
|
gem push *.gem
|
30
30
|
env:
|
31
|
-
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
31
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/.gitignore
CHANGED
data/Makefile
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Session Validator Client Ruby 
|
2
2
|
|
3
3
|
Ruby client for Emarsys session validator service.
|
4
4
|
|
@@ -10,35 +10,38 @@ gem install session-validator-client
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
* `KEY_POOL`
|
16
|
-
* `SESSION_VALIDATOR_KEYID`
|
17
|
-
* `SESSION_VALIDATOR_URL`
|
18
|
-
|
19
|
-
### Validating a single Msid
|
20
|
-
`valid?(msid)` returns `true` if `msid` is valid
|
13
|
+
Copy `.env.example` to `.env` and set the necessary values for usage in your service.
|
21
14
|
|
15
|
+
### Create client
|
22
16
|
```ruby
|
23
17
|
require "session_validator"
|
24
18
|
|
25
19
|
client = SessionValidator::Client.new
|
26
|
-
client.valid?("staging_int_5ad5f96f307cf9.61063404")
|
27
20
|
```
|
28
21
|
|
29
|
-
###
|
30
|
-
|
22
|
+
### Requests without Escher
|
23
|
+
For mTLS on GAP.
|
31
24
|
|
32
25
|
```ruby
|
33
26
|
require "session_validator"
|
34
27
|
|
35
|
-
client = SessionValidator::Client.new
|
28
|
+
client = SessionValidator::Client.new(use_escher: false)
|
29
|
+
```
|
30
|
+
|
31
|
+
### Validating a single MSID
|
32
|
+
```ruby
|
33
|
+
client.valid?("staging_int_5ad5f96f307cf9.61063404")
|
34
|
+
```
|
35
|
+
|
36
|
+
### Batch validating multiple MSIDs
|
37
|
+
Returns an array of the invalid MSIDs.
|
38
|
+
```ruby
|
36
39
|
client.filter_invalid(["staging_int_5ad5f96f307cf9.61063404", "staging_int_5ad5f96f307cf9.61063405"])
|
37
40
|
```
|
38
41
|
|
39
|
-
##
|
42
|
+
## Local development
|
40
43
|
|
44
|
+
### Running tests
|
41
45
|
```bash
|
42
|
-
|
43
|
-
$ rspec
|
46
|
+
make test
|
44
47
|
```
|
data/docker-compose.yml
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: session-validator-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emarsys Technologies Ltd.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escher-keypool
|
@@ -134,14 +134,16 @@ executables: []
|
|
134
134
|
extensions: []
|
135
135
|
extra_rdoc_files: []
|
136
136
|
files:
|
137
|
-
- ".env"
|
137
|
+
- ".env.example"
|
138
138
|
- ".github/workflows/ruby.yml"
|
139
139
|
- ".gitignore"
|
140
140
|
- ".rspec"
|
141
141
|
- Gemfile
|
142
142
|
- LICENSE.txt
|
143
|
+
- Makefile
|
143
144
|
- README.md
|
144
145
|
- bin/console
|
146
|
+
- docker-compose.yml
|
145
147
|
- lib/session_validator.rb
|
146
148
|
- lib/session_validator/cached_client.rb
|
147
149
|
- lib/session_validator/client.rb
|
/data/{.env → .env.example}
RENAMED
File without changes
|