-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-tests.http
More file actions
48 lines (33 loc) · 842 Bytes
/
api-tests.http
File metadata and controls
48 lines (33 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@baseUrl = http://localhost:1198
@json = application/json
### 1. Health check
GET {{baseUrl}}/health
### 2. Hash password (default rounds)
POST {{baseUrl}}/hash
Content-Type: {{json}}
{
"password": "Hello@123"
}
### 3. Hash password (custom rounds)
POST {{baseUrl}}/hash
Content-Type: {{json}}
{
"password": "Hello@123",
"rounds": 10
}
### 4. Verify correct password
POST {{baseUrl}}/verify
Content-Type: {{json}}
{
"password": "Hello@123",
"hash": "$2b$12$fPV1jRg.yAlXEmidEkCBbOV5Ye7ET8SuWxPaEoQeCoBsPAhv4wjFe"
}
### 5. Verify wrong password
POST {{baseUrl}}/verify
Content-Type: {{json}}
{
"password": "Wrong@123",
"hash": "$2b$12$fPV1jRg.yAlXEmidEkCBbOV5Ye7ET8SuWxPaEoQeCoBsPAhv4wjFe"
}
### Analyze bcrypt hash (URL-encoded)
GET {{baseUrl}}/analyze/$2b$12$fPV1jRg.yAlXEmidEkCBbOV5Ye7ET8SuWxPaEoQeCoBsPAhv4wjFe