castle-rb 1.2.4 → 1.2.5
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 +16 -1
- data/lib/castle-rb/client.rb +4 -0
- data/lib/castle-rb/models/authentication.rb +7 -0
- data/lib/castle-rb/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af121c5d1d3c642d3435268c16941c87379b2994
|
4
|
+
data.tar.gz: 5b38a50048cef8e962a8491e9146b8ca61f90ee1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2819e4740c9cd3b61c10c1d7256ef7e0d1eec0279f23f57820177ad6dd2bd381b149a8fcc31ce37498ffffb0d217f18da57c2216a4cd330be03df92374aaee12
|
7
|
+
data.tar.gz: 527db83f6d74a97f64e5643653e56cd3b57862d2429dc79a9f6757c879dedfcb63f4a327ce899857324adf7d3708b015015365a83555995ca585481ed89b11fd
|
data/README.md
CHANGED
@@ -23,7 +23,19 @@ Castle.api_secret = 'YOUR_API_SECRET'
|
|
23
23
|
|
24
24
|
A Castle client instance will automatically be made available as `castle` in your Rails, Sinatra or Padrino controllers.
|
25
25
|
|
26
|
-
##
|
26
|
+
## Identifying users
|
27
|
+
|
28
|
+
Call `identify` when a user logs in or updates their information.
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
castle.identify(user.id, {
|
32
|
+
created_at: user.created_at,
|
33
|
+
email: user.email,
|
34
|
+
name: user.name
|
35
|
+
})
|
36
|
+
```
|
37
|
+
|
38
|
+
## Tracking events
|
27
39
|
|
28
40
|
`track` lets you record the security-related actions your users perform. The more actions you track, the more accurate Castle is in identifying fraudsters.
|
29
41
|
|
@@ -54,6 +66,9 @@ castle.track(
|
|
54
66
|
- `$logout.succeeded`: Record when a user logs out.
|
55
67
|
- `$registration.succeeded`: Capture account creation, both when a user signs up as well as when created manually by an administrator.
|
56
68
|
- `$registration.failed`: Record when an account failed to be created.
|
69
|
+
- `$email_change.requested`: An attempt was made to change a user’s email.
|
70
|
+
- `$email_change.succeeded`: The user completed all of the steps in the email address change process and the email was successfully changed.
|
71
|
+
- `$email_change.failed`: Use to record when a user failed to change their email address.
|
57
72
|
- `$challenge.requested`: Record when a user is prompted with additional verification, such as two-factor authentication or a captcha.
|
58
73
|
- `$challenge.succeeded`: Record when additional verification was successful.
|
59
74
|
- `$challenge.failed`: Record when additional verification failed.
|
data/lib/castle-rb/client.rb
CHANGED
data/lib/castle-rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: castle-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Brissmyr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: her
|
@@ -163,6 +163,7 @@ files:
|
|
163
163
|
- lib/castle-rb/errors.rb
|
164
164
|
- lib/castle-rb/ext/her.rb
|
165
165
|
- lib/castle-rb/models/account.rb
|
166
|
+
- lib/castle-rb/models/authentication.rb
|
166
167
|
- lib/castle-rb/models/context.rb
|
167
168
|
- lib/castle-rb/models/event.rb
|
168
169
|
- lib/castle-rb/models/location.rb
|
@@ -205,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
206
|
version: '0'
|
206
207
|
requirements: []
|
207
208
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.4.
|
209
|
+
rubygems_version: 2.4.5.1
|
209
210
|
signing_key:
|
210
211
|
specification_version: 4
|
211
212
|
summary: Castle
|