Skip to content

Commit f49bd1e

Browse files
author
Inbal Tako
committed
SN-1938 Validate user id
1 parent 9fc38b9 commit f49bd1e

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,21 @@ SecureNative can automatically load your config from *securenative.properties* f
5757

5858
```java
5959
// Options 1: Use default config file path
60-
SecureNative secureNative = SecureNative.init();
60+
SecureNative securenative = SecureNative.init();
6161

6262
// Options 2: Use specific config file path
6363
Path path = Paths.get("/path/to/securenative.properties");
64-
SecureNative secureNative = SecureNative.init(path);
64+
SecureNative securenative = SecureNative.init(path);
6565
```
6666
### Option 2: Initialize via API Key
6767

6868
```java
69-
SecureNative secureNative = SecureNative.init("YOUR_API_KEY");
69+
SecureNative securenative = SecureNative.init("YOUR_API_KEY");
7070
```
7171

7272
### Option 3: Initialize via ConfigurationBuilder
7373
```java
74-
SecureNative secureNative = SecureNative.init(SecureNative.configBuilder()
74+
SecureNative securenative = SecureNative.init(SecureNative.configBuilder()
7575
.withApiKey("API_KEY")
7676
.withMaxEvents(10)
7777
.withLogLevel("error")
@@ -81,7 +81,7 @@ SecureNative secureNative = SecureNative.init(SecureNative.configBuilder()
8181
## Getting SecureNative instance
8282
Once initialized, sdk will create a singleton instance which you can get:
8383
```java
84-
SecureNative secureNative = SecureNative.getInstance();
84+
SecureNative securenative = SecureNative.getInstance();
8585
```
8686

8787
## Tracking events
@@ -90,7 +90,7 @@ Once the SDK has been initialized, tracking requests sent through the SDK
9090
instance. Make sure you build event with the EventBuilder:
9191

9292
```java
93-
SecureNative secureNative = SecureNative.getInstance();
93+
SecureNative securenative = SecureNative.getInstance();
9494

9595
SecureNativeContext context = SecureNative.contextBuilder()
9696
.withIp("127.0.0.1")
@@ -136,7 +136,7 @@ public void track(HttpServletRequest request, HttpServletResponse response) {
136136
.timestamp(new Date())
137137
.build();
138138

139-
secureNative.track(eventOptions);
139+
securenative.track(eventOptions);
140140
}
141141
```
142142

@@ -163,7 +163,7 @@ public void verify(HttpServletRequest request, HttpServletResponse response) {
163163
.timestamp(new Date())
164164
.build();
165165

166-
VerifyResult verifyResult = secureNative.verify(eventOptions);
166+
VerifyResult verifyResult = securenative.verify(eventOptions);
167167
verifyResult.getRiskLevel(); // Low, Medium, High
168168
verifyResult.score(); // Risk score: 0 -1 (0 - Very Low, 1 - Very High)
169169
verifyResult.getTriggers(); // ["TOR", "New IP", "New City"]
@@ -177,9 +177,9 @@ Apply our filter to verify the request is from us, example in spring:
177177
```java
178178
@RequestMapping("/webhook")
179179
public void webhookEndpoint(HttpServletRequest request, HttpServletResponse response) {
180-
SecureNative secureNative = SecureNative.getInstance();
180+
SecureNative securenative = SecureNative.getInstance();
181181

182182
// Checks if request is verified
183-
Boolean isVerified = secureNative.verifyRequestPayload(request);
183+
Boolean isVerified = securenative.verifyRequestPayload(request);
184184
}
185185
```

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.securenative.java</groupId>
77
<artifactId>securenative-java</artifactId>
88
<packaging>jar</packaging>
9-
<version>0.5.4</version>
9+
<version>0.5.5</version>
1010
<url>https://github.com/securenative/securenative-java</url>
1111

1212
<name>${project.groupId}:${project.artifactId}:${project.version}</name>

0 commit comments

Comments
 (0)