https://github.com/emartech/session-validator-client-ruby
Ruby client for Emarsys session validator service
https://github.com/emartech/session-validator-client-ruby
Last synced: over 1 year ago
JSON representation
Ruby client for Emarsys session validator service
- Host: GitHub
- URL: https://github.com/emartech/session-validator-client-ruby
- Owner: emartech
- License: mit
- Created: 2017-04-28T13:16:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T09:07:52.000Z (over 3 years ago)
- Last Synced: 2024-04-14T07:41:07.407Z (over 2 years ago)
- Language: Ruby
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 14
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Session Validator Client Ruby 
Ruby client for Emarsys session validator service.
## Install
```bash
gem install session-validator-client
```
## Usage
Copy `.env.example` to `.env` and set the necessary values for usage in your service.
### Create client
```ruby
require "session_validator"
client = SessionValidator::Client.new
```
### Requests without Escher
For mTLS on GAP.
```ruby
require "session_validator"
client = SessionValidator::Client.new(use_escher: false)
```
### Validating a single MSID
```ruby
client.valid?("staging_int_5ad5f96f307cf9.61063404")
```
### Batch validating multiple MSIDs
Returns an array of the invalid MSIDs.
```ruby
client.filter_invalid(["staging_int_5ad5f96f307cf9.61063404", "staging_int_5ad5f96f307cf9.61063405"])
```
## Local development
### Running tests
```bash
make test
```