securenative 0.1.28 → 0.1.29
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/README.md +23 -32
- data/lib/securenative.rb +49 -0
- data/{out/test/securenative-ruby → spec}/spec_helper.rb +0 -0
- metadata +8 -109
- data/.github/workflows/ci.yml +0 -49
- data/.github/workflows/publish.yml +0 -60
- data/.github/workflows/test.yml +0 -48
- data/.gitignore +0 -40
- data/.rakeTasks +0 -7
- data/.rspec +0 -3
- data/Gemfile +0 -11
- data/Gemfile.lock +0 -270
- data/LICENSE +0 -21
- data/Rakefile +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/securenative/api_manager.rb +0 -41
- data/lib/securenative/config/configuration_builder.rb +0 -29
- data/lib/securenative/config/configuration_manager.rb +0 -58
- data/lib/securenative/config/securenative_options.rb +0 -25
- data/lib/securenative/context/hanami_context.rb +0 -44
- data/lib/securenative/context/rails_context.rb +0 -46
- data/lib/securenative/context/securenative_context.rb +0 -69
- data/lib/securenative/context/sinatra_context.rb +0 -44
- data/lib/securenative/enums/api_route.rb +0 -8
- data/lib/securenative/enums/event_types.rb +0 -25
- data/lib/securenative/enums/failover_strategy.rb +0 -8
- data/lib/securenative/enums/risk_level.rb +0 -9
- data/lib/securenative/errors/securenative_config_error.rb +0 -6
- data/lib/securenative/errors/securenative_http_error.rb +0 -6
- data/lib/securenative/errors/securenative_invalid_options_error.rb +0 -6
- data/lib/securenative/errors/securenative_invalid_uri_error.rb +0 -6
- data/lib/securenative/errors/securenative_parse_error.rb +0 -6
- data/lib/securenative/errors/securenative_sdk_Illegal_state_error.rb +0 -6
- data/lib/securenative/errors/securenative_sdk_error.rb +0 -6
- data/lib/securenative/event_manager.rb +0 -158
- data/lib/securenative/http/secure_native_http_response.rb +0 -14
- data/lib/securenative/http/securenative_http_client.rb +0 -52
- data/lib/securenative/models/client_token.rb +0 -14
- data/lib/securenative/models/device.rb +0 -12
- data/lib/securenative/models/event_options.rb +0 -39
- data/lib/securenative/models/request_context.rb +0 -20
- data/lib/securenative/models/request_options.rb +0 -14
- data/lib/securenative/models/sdk_event.rb +0 -51
- data/lib/securenative/models/user_traits.rb +0 -15
- data/lib/securenative/models/verify_result.rb +0 -18
- data/lib/securenative/sdk.rb +0 -85
- data/lib/securenative/utils/date_utils.rb +0 -11
- data/lib/securenative/utils/encryption_utils.rb +0 -51
- data/lib/securenative/utils/ip_utils.rb +0 -25
- data/lib/securenative/utils/request_utils.rb +0 -82
- data/lib/securenative/utils/secure_native_logger.rb +0 -46
- data/lib/securenative/utils/signature_utils.rb +0 -18
- data/lib/securenative/utils/utils.rb +0 -11
- data/lib/securenative/utils/version_utils.rb +0 -13
- data/out/production/securenative-ruby/api_manager.rb +0 -39
- data/out/production/securenative-ruby/config/configuration_builder.rb +0 -27
- data/out/production/securenative-ruby/config/configuration_manager.rb +0 -56
- data/out/production/securenative-ruby/config/securenative_options.rb +0 -23
- data/out/production/securenative-ruby/context/hanami_context.rb +0 -42
- data/out/production/securenative-ruby/context/rails_context.rb +0 -44
- data/out/production/securenative-ruby/context/securenative_context.rb +0 -67
- data/out/production/securenative-ruby/context/sinatra_context.rb +0 -42
- data/out/production/securenative-ruby/enums/api_route.rb +0 -6
- data/out/production/securenative-ruby/enums/event_types.rb +0 -23
- data/out/production/securenative-ruby/enums/failover_strategy.rb +0 -6
- data/out/production/securenative-ruby/enums/risk_level.rb +0 -7
- data/out/production/securenative-ruby/errors/securenative_config_error.rb +0 -4
- data/out/production/securenative-ruby/errors/securenative_http_error.rb +0 -4
- data/out/production/securenative-ruby/errors/securenative_invalid_options_error.rb +0 -4
- data/out/production/securenative-ruby/errors/securenative_invalid_uri_error.rb +0 -4
- data/out/production/securenative-ruby/errors/securenative_parse_error.rb +0 -4
- data/out/production/securenative-ruby/errors/securenative_sdk_Illegal_state_error.rb +0 -4
- data/out/production/securenative-ruby/errors/securenative_sdk_error.rb +0 -4
- data/out/production/securenative-ruby/event_manager.rb +0 -157
- data/out/production/securenative-ruby/http/secure_native_http_response.rb +0 -12
- data/out/production/securenative-ruby/http/securenative_http_client.rb +0 -50
- data/out/production/securenative-ruby/models/client_token.rb +0 -12
- data/out/production/securenative-ruby/models/device.rb +0 -10
- data/out/production/securenative-ruby/models/event_options.rb +0 -37
- data/out/production/securenative-ruby/models/request_context.rb +0 -18
- data/out/production/securenative-ruby/models/request_options.rb +0 -12
- data/out/production/securenative-ruby/models/sdk_event.rb +0 -49
- data/out/production/securenative-ruby/models/user_traits.rb +0 -13
- data/out/production/securenative-ruby/models/verify_result.rb +0 -16
- data/out/production/securenative-ruby/securenative.rb +0 -83
- data/out/production/securenative-ruby/utils/date_utils.rb +0 -9
- data/out/production/securenative-ruby/utils/encryption_utils.rb +0 -49
- data/out/production/securenative-ruby/utils/ip_utils.rb +0 -23
- data/out/production/securenative-ruby/utils/request_utils.rb +0 -69
- data/out/production/securenative-ruby/utils/secure_native_logger.rb +0 -44
- data/out/production/securenative-ruby/utils/signature_utils.rb +0 -16
- data/out/production/securenative-ruby/utils/utils.rb +0 -9
- data/out/production/securenative-ruby/utils/version_utils.rb +0 -11
- data/out/test/securenative-ruby/spec_api_manager.rb +0 -87
- data/out/test/securenative-ruby/spec_context_builder.rb +0 -87
- data/out/test/securenative-ruby/spec_date_utils.rb +0 -13
- data/out/test/securenative-ruby/spec_encryption_utils.rb +0 -26
- data/out/test/securenative-ruby/spec_event_manager.rb +0 -93
- data/out/test/securenative-ruby/spec_ip_utils.rb +0 -41
- data/out/test/securenative-ruby/spec_request_utils.rb +0 -25
- data/out/test/securenative-ruby/spec_sdk_event.rb +0 -24
- data/out/test/securenative-ruby/spec_securenative.rb +0 -61
- data/out/test/securenative-ruby/spec_securenative_http_client.rb +0 -31
- data/out/test/securenative-ruby/spec_signature_utils.rb +0 -18
- data/out/test/securenative-ruby/spec_version_util.rb +0 -10
- data/securenative.gemspec +0 -30
data/.github/workflows/test.yml
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
name: Testing
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- '*'
|
7
|
-
- '!master'
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
test:
|
11
|
-
name: Testing
|
12
|
-
runs-on: ${{ matrix.os }}
|
13
|
-
strategy:
|
14
|
-
matrix:
|
15
|
-
os: [ubuntu-latest]
|
16
|
-
steps:
|
17
|
-
- uses: actions/checkout@v1
|
18
|
-
- uses: actions/setup-ruby@v1
|
19
|
-
with:
|
20
|
-
ruby-version: 2.6.x
|
21
|
-
- name: Install dependencies
|
22
|
-
run: |
|
23
|
-
gem install bundler
|
24
|
-
bundler install
|
25
|
-
- name: Run tests
|
26
|
-
run: bundle exec rspec spec --pattern **/spec_*.rb
|
27
|
-
|
28
|
-
- name: Notify slack success
|
29
|
-
if: success()
|
30
|
-
env:
|
31
|
-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
32
|
-
uses: voxmedia/github-action-slack-notify-build@v1.1.1
|
33
|
-
with:
|
34
|
-
message_id: ${{ steps.slack.outputs.message_id }}
|
35
|
-
channel: github-actions
|
36
|
-
status: SUCCESS
|
37
|
-
color: good
|
38
|
-
|
39
|
-
- name: Notify slack fail
|
40
|
-
if: failure()
|
41
|
-
env:
|
42
|
-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
43
|
-
uses: voxmedia/github-action-slack-notify-build@v1.1.1
|
44
|
-
with:
|
45
|
-
message_id: ${{ steps.slack.outputs.message_id }}
|
46
|
-
channel: github-actions
|
47
|
-
status: FAILED
|
48
|
-
color: danger
|
data/.gitignore
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/coverage/
|
5
|
-
/InstalledFiles
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/spec/examples.txt
|
9
|
-
/test/tmp/
|
10
|
-
/test/version_tmp/
|
11
|
-
/tmp/
|
12
|
-
.idea
|
13
|
-
*.iml
|
14
|
-
# Used by dotenv library to load environment variables.
|
15
|
-
# .env
|
16
|
-
|
17
|
-
# Ignore Byebug command history file.
|
18
|
-
.byebug_history
|
19
|
-
|
20
|
-
## Documentation cache and generated files:
|
21
|
-
/.yardoc/
|
22
|
-
/_yardoc/
|
23
|
-
/doc/
|
24
|
-
/rdoc/
|
25
|
-
|
26
|
-
## Environment normalization:
|
27
|
-
/.bundle/
|
28
|
-
/vendor/bundle
|
29
|
-
/lib/bundler/man/
|
30
|
-
|
31
|
-
# for a library or gem, you might want to ignore these files since the code is
|
32
|
-
# intended to run in multiple environments; otherwise, check them in:
|
33
|
-
# Gemfile.lock
|
34
|
-
# .ruby-version
|
35
|
-
# .ruby-gemset
|
36
|
-
|
37
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
38
|
-
.rvmrc
|
39
|
-
.DS_Store
|
40
|
-
.rspec_status
|
data/.rakeTasks
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
-
You are allowed to:
|
4
|
-
1. Remove rake task
|
5
|
-
2. Add existing rake tasks
|
6
|
-
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
-
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
data/.rspec
DELETED
data/Gemfile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
gem "rspec"
|
5
|
-
gem "rake"
|
6
|
-
gem "simplecov", :require => false, :group => :test
|
7
|
-
gem "codecov", :require => false, :group => :test
|
8
|
-
gem "webmock", :require => false, :group => :test
|
9
|
-
gem "rails", :require => false, :group => :test
|
10
|
-
gem "hanami", :require => false, :group => :test
|
11
|
-
gem "sinatra", :require => false, :group => :test
|
data/Gemfile.lock
DELETED
@@ -1,270 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
securenative (0.1.28)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
actioncable (6.0.3.3)
|
10
|
-
actionpack (= 6.0.3.3)
|
11
|
-
nio4r (~> 2.0)
|
12
|
-
websocket-driver (>= 0.6.1)
|
13
|
-
actionmailbox (6.0.3.3)
|
14
|
-
actionpack (= 6.0.3.3)
|
15
|
-
activejob (= 6.0.3.3)
|
16
|
-
activerecord (= 6.0.3.3)
|
17
|
-
activestorage (= 6.0.3.3)
|
18
|
-
activesupport (= 6.0.3.3)
|
19
|
-
mail (>= 2.7.1)
|
20
|
-
actionmailer (6.0.3.3)
|
21
|
-
actionpack (= 6.0.3.3)
|
22
|
-
actionview (= 6.0.3.3)
|
23
|
-
activejob (= 6.0.3.3)
|
24
|
-
mail (~> 2.5, >= 2.5.4)
|
25
|
-
rails-dom-testing (~> 2.0)
|
26
|
-
actionpack (6.0.3.3)
|
27
|
-
actionview (= 6.0.3.3)
|
28
|
-
activesupport (= 6.0.3.3)
|
29
|
-
rack (~> 2.0, >= 2.0.8)
|
30
|
-
rack-test (>= 0.6.3)
|
31
|
-
rails-dom-testing (~> 2.0)
|
32
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
33
|
-
actiontext (6.0.3.3)
|
34
|
-
actionpack (= 6.0.3.3)
|
35
|
-
activerecord (= 6.0.3.3)
|
36
|
-
activestorage (= 6.0.3.3)
|
37
|
-
activesupport (= 6.0.3.3)
|
38
|
-
nokogiri (>= 1.8.5)
|
39
|
-
actionview (6.0.3.3)
|
40
|
-
activesupport (= 6.0.3.3)
|
41
|
-
builder (~> 3.1)
|
42
|
-
erubi (~> 1.4)
|
43
|
-
rails-dom-testing (~> 2.0)
|
44
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
45
|
-
activejob (6.0.3.3)
|
46
|
-
activesupport (= 6.0.3.3)
|
47
|
-
globalid (>= 0.3.6)
|
48
|
-
activemodel (6.0.3.3)
|
49
|
-
activesupport (= 6.0.3.3)
|
50
|
-
activerecord (6.0.3.3)
|
51
|
-
activemodel (= 6.0.3.3)
|
52
|
-
activesupport (= 6.0.3.3)
|
53
|
-
activestorage (6.0.3.3)
|
54
|
-
actionpack (= 6.0.3.3)
|
55
|
-
activejob (= 6.0.3.3)
|
56
|
-
activerecord (= 6.0.3.3)
|
57
|
-
marcel (~> 0.3.1)
|
58
|
-
activesupport (6.0.3.3)
|
59
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
60
|
-
i18n (>= 0.7, < 2)
|
61
|
-
minitest (~> 5.1)
|
62
|
-
tzinfo (~> 1.1)
|
63
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
64
|
-
addressable (2.7.0)
|
65
|
-
public_suffix (>= 2.0.2, < 5.0)
|
66
|
-
builder (3.2.4)
|
67
|
-
codecov (0.2.11)
|
68
|
-
json
|
69
|
-
simplecov
|
70
|
-
concurrent-ruby (1.1.7)
|
71
|
-
crack (0.4.4)
|
72
|
-
crass (1.0.6)
|
73
|
-
diff-lcs (1.4.4)
|
74
|
-
docile (1.3.2)
|
75
|
-
dry-configurable (0.11.6)
|
76
|
-
concurrent-ruby (~> 1.0)
|
77
|
-
dry-core (~> 0.4, >= 0.4.7)
|
78
|
-
dry-equalizer (~> 0.2)
|
79
|
-
dry-container (0.7.2)
|
80
|
-
concurrent-ruby (~> 1.0)
|
81
|
-
dry-configurable (~> 0.1, >= 0.1.3)
|
82
|
-
dry-core (0.4.9)
|
83
|
-
concurrent-ruby (~> 1.0)
|
84
|
-
dry-equalizer (0.3.0)
|
85
|
-
dry-logic (0.4.2)
|
86
|
-
dry-container (~> 0.2, >= 0.2.6)
|
87
|
-
dry-core (~> 0.2)
|
88
|
-
dry-equalizer (~> 0.2)
|
89
|
-
dry-types (0.12.3)
|
90
|
-
concurrent-ruby (~> 1.0)
|
91
|
-
dry-configurable (~> 0.1)
|
92
|
-
dry-container (~> 0.3)
|
93
|
-
dry-core (~> 0.2, >= 0.2.1)
|
94
|
-
dry-equalizer (~> 0.2)
|
95
|
-
dry-logic (~> 0.4, >= 0.4.2)
|
96
|
-
inflecto (~> 0.0.0, >= 0.0.2)
|
97
|
-
dry-validation (0.11.2)
|
98
|
-
concurrent-ruby (~> 1.0)
|
99
|
-
dry-configurable (~> 0.1, >= 0.1.3)
|
100
|
-
dry-core (~> 0.2, >= 0.2.1)
|
101
|
-
dry-equalizer (~> 0.2)
|
102
|
-
dry-logic (~> 0.4.2)
|
103
|
-
dry-types (~> 0.12.0)
|
104
|
-
erubi (1.9.0)
|
105
|
-
globalid (0.4.2)
|
106
|
-
activesupport (>= 4.2.0)
|
107
|
-
hanami (1.3.3)
|
108
|
-
bundler (>= 1.6, < 3)
|
109
|
-
concurrent-ruby (~> 1.0)
|
110
|
-
hanami-assets (~> 1.3)
|
111
|
-
hanami-cli (~> 0.3)
|
112
|
-
hanami-controller (~> 1.3)
|
113
|
-
hanami-helpers (~> 1.3)
|
114
|
-
hanami-mailer (~> 1.3)
|
115
|
-
hanami-router (~> 1.3)
|
116
|
-
hanami-utils (~> 1.3)
|
117
|
-
hanami-validations (>= 1.3, < 3)
|
118
|
-
hanami-view (~> 1.3)
|
119
|
-
hanami-assets (1.3.4)
|
120
|
-
hanami-helpers (~> 1.3)
|
121
|
-
hanami-utils (~> 1.3)
|
122
|
-
tilt (~> 2.0, >= 2.0.2)
|
123
|
-
hanami-cli (0.3.1)
|
124
|
-
concurrent-ruby (~> 1.0)
|
125
|
-
hanami-utils (~> 1.3)
|
126
|
-
hanami-controller (1.3.3)
|
127
|
-
hanami-utils (~> 1.3)
|
128
|
-
rack (~> 2.0)
|
129
|
-
hanami-helpers (1.3.3)
|
130
|
-
hanami-utils (~> 1.3)
|
131
|
-
hanami-mailer (1.3.2)
|
132
|
-
hanami-utils (~> 1.3)
|
133
|
-
mail (~> 2.6)
|
134
|
-
tilt (~> 2.0, >= 2.0.1)
|
135
|
-
hanami-router (1.3.2)
|
136
|
-
hanami-utils (~> 1.3)
|
137
|
-
http_router (= 0.11.2)
|
138
|
-
rack (~> 2.0)
|
139
|
-
hanami-utils (1.3.6)
|
140
|
-
concurrent-ruby (~> 1.0)
|
141
|
-
transproc (~> 1.0)
|
142
|
-
hanami-validations (1.3.6)
|
143
|
-
dry-logic (~> 0.4.2, < 0.5)
|
144
|
-
dry-validation (~> 0.11, < 0.12)
|
145
|
-
hanami-utils (~> 1.3)
|
146
|
-
hanami-view (1.3.3)
|
147
|
-
hanami-utils (~> 1.3)
|
148
|
-
tilt (~> 2.0, >= 2.0.1)
|
149
|
-
hashdiff (1.0.1)
|
150
|
-
http_router (0.11.2)
|
151
|
-
rack (>= 1.0.0)
|
152
|
-
url_mount (~> 0.2.1)
|
153
|
-
i18n (1.8.5)
|
154
|
-
concurrent-ruby (~> 1.0)
|
155
|
-
inflecto (0.0.2)
|
156
|
-
json (2.3.1)
|
157
|
-
loofah (2.7.0)
|
158
|
-
crass (~> 1.0.2)
|
159
|
-
nokogiri (>= 1.5.9)
|
160
|
-
mail (2.7.1)
|
161
|
-
mini_mime (>= 0.1.1)
|
162
|
-
marcel (0.3.3)
|
163
|
-
mimemagic (~> 0.3.2)
|
164
|
-
method_source (1.0.0)
|
165
|
-
mimemagic (0.3.5)
|
166
|
-
mini_mime (1.0.2)
|
167
|
-
mini_portile2 (2.4.0)
|
168
|
-
minitest (5.14.2)
|
169
|
-
mustermann (1.1.1)
|
170
|
-
ruby2_keywords (~> 0.0.1)
|
171
|
-
nio4r (2.5.4)
|
172
|
-
nokogiri (1.10.10)
|
173
|
-
mini_portile2 (~> 2.4.0)
|
174
|
-
public_suffix (4.0.6)
|
175
|
-
rack (2.2.3)
|
176
|
-
rack-protection (2.1.0)
|
177
|
-
rack
|
178
|
-
rack-test (1.1.0)
|
179
|
-
rack (>= 1.0, < 3)
|
180
|
-
rails (6.0.3.3)
|
181
|
-
actioncable (= 6.0.3.3)
|
182
|
-
actionmailbox (= 6.0.3.3)
|
183
|
-
actionmailer (= 6.0.3.3)
|
184
|
-
actionpack (= 6.0.3.3)
|
185
|
-
actiontext (= 6.0.3.3)
|
186
|
-
actionview (= 6.0.3.3)
|
187
|
-
activejob (= 6.0.3.3)
|
188
|
-
activemodel (= 6.0.3.3)
|
189
|
-
activerecord (= 6.0.3.3)
|
190
|
-
activestorage (= 6.0.3.3)
|
191
|
-
activesupport (= 6.0.3.3)
|
192
|
-
bundler (>= 1.3.0)
|
193
|
-
railties (= 6.0.3.3)
|
194
|
-
sprockets-rails (>= 2.0.0)
|
195
|
-
rails-dom-testing (2.0.3)
|
196
|
-
activesupport (>= 4.2.0)
|
197
|
-
nokogiri (>= 1.6)
|
198
|
-
rails-html-sanitizer (1.3.0)
|
199
|
-
loofah (~> 2.3)
|
200
|
-
railties (6.0.3.3)
|
201
|
-
actionpack (= 6.0.3.3)
|
202
|
-
activesupport (= 6.0.3.3)
|
203
|
-
method_source
|
204
|
-
rake (>= 0.8.7)
|
205
|
-
thor (>= 0.20.3, < 2.0)
|
206
|
-
rake (13.0.1)
|
207
|
-
rspec (3.9.0)
|
208
|
-
rspec-core (~> 3.9.0)
|
209
|
-
rspec-expectations (~> 3.9.0)
|
210
|
-
rspec-mocks (~> 3.9.0)
|
211
|
-
rspec-core (3.9.2)
|
212
|
-
rspec-support (~> 3.9.3)
|
213
|
-
rspec-expectations (3.9.2)
|
214
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
215
|
-
rspec-support (~> 3.9.0)
|
216
|
-
rspec-mocks (3.9.1)
|
217
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
218
|
-
rspec-support (~> 3.9.0)
|
219
|
-
rspec-support (3.9.3)
|
220
|
-
ruby2_keywords (0.0.2)
|
221
|
-
simplecov (0.19.0)
|
222
|
-
docile (~> 1.1)
|
223
|
-
simplecov-html (~> 0.11)
|
224
|
-
simplecov-html (0.12.3)
|
225
|
-
sinatra (2.1.0)
|
226
|
-
mustermann (~> 1.0)
|
227
|
-
rack (~> 2.2)
|
228
|
-
rack-protection (= 2.1.0)
|
229
|
-
tilt (~> 2.0)
|
230
|
-
sprockets (4.0.2)
|
231
|
-
concurrent-ruby (~> 1.0)
|
232
|
-
rack (> 1, < 3)
|
233
|
-
sprockets-rails (3.2.2)
|
234
|
-
actionpack (>= 4.0)
|
235
|
-
activesupport (>= 4.0)
|
236
|
-
sprockets (>= 3.0.0)
|
237
|
-
thor (1.0.1)
|
238
|
-
thread_safe (0.3.6)
|
239
|
-
tilt (2.0.10)
|
240
|
-
transproc (1.1.1)
|
241
|
-
tzinfo (1.2.7)
|
242
|
-
thread_safe (~> 0.1)
|
243
|
-
url_mount (0.2.1)
|
244
|
-
rack
|
245
|
-
webmock (3.9.1)
|
246
|
-
addressable (>= 2.3.6)
|
247
|
-
crack (>= 0.3.2)
|
248
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
249
|
-
websocket-driver (0.7.3)
|
250
|
-
websocket-extensions (>= 0.1.0)
|
251
|
-
websocket-extensions (0.1.5)
|
252
|
-
zeitwerk (2.4.0)
|
253
|
-
|
254
|
-
PLATFORMS
|
255
|
-
ruby
|
256
|
-
|
257
|
-
DEPENDENCIES
|
258
|
-
bundler (~> 2.0)
|
259
|
-
codecov
|
260
|
-
hanami
|
261
|
-
rails
|
262
|
-
rake
|
263
|
-
rspec
|
264
|
-
securenative!
|
265
|
-
simplecov
|
266
|
-
sinatra
|
267
|
-
webmock
|
268
|
-
|
269
|
-
BUNDLED WITH
|
270
|
-
2.1.4
|
data/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2019 SecureNative
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "securenative"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'securenative/models/sdk_event'
|
4
|
-
require 'securenative/enums/failover_strategy'
|
5
|
-
require 'securenative/enums/risk_level'
|
6
|
-
require 'securenative/enums/api_route'
|
7
|
-
require 'securenative/models/verify_result'
|
8
|
-
require 'json'
|
9
|
-
|
10
|
-
module SecureNative
|
11
|
-
class ApiManager
|
12
|
-
def initialize(event_manager, securenative_options)
|
13
|
-
@event_manager = event_manager
|
14
|
-
@options = securenative_options
|
15
|
-
end
|
16
|
-
|
17
|
-
def track(event_options)
|
18
|
-
SecureNativeLogger.debug('Track event call')
|
19
|
-
event = SDKEvent.new(event_options, @options)
|
20
|
-
@event_manager.send_async(event, ApiRoute::TRACK)
|
21
|
-
end
|
22
|
-
|
23
|
-
def verify(event_options)
|
24
|
-
SecureNativeLogger.debug('Verify event call')
|
25
|
-
event = SDKEvent.new(event_options, @options)
|
26
|
-
|
27
|
-
begin
|
28
|
-
res = @event_manager.send_sync(event, ApiRoute::VERIFY, false)
|
29
|
-
ver_result = JSON.parse(res.body)
|
30
|
-
return VerifyResult.new(risk_level: ver_result['riskLevel'], score: ver_result['score'], triggers: ver_result['triggers'])
|
31
|
-
rescue StandardError => e
|
32
|
-
SecureNativeLogger.debug("Failed to call verify; #{e}")
|
33
|
-
end
|
34
|
-
if @options.fail_over_strategy == FailOverStrategy::FAIL_OPEN
|
35
|
-
return VerifyResult.new(risk_level: RiskLevel::LOW, score: 0, triggers: nil)
|
36
|
-
end
|
37
|
-
|
38
|
-
VerifyResult.new(risk_level: RiskLevel::HIGH, score: 1, triggers: nil)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|