Newer
Older
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
49
50
51
52
53
# Admin IP/port
ip=127.0.0.1:8000
# Public IP/port
pip=127.0.0.1:8080
echo "Check if admin port can be reached:"
curl http://$ip/health/ready
echo "List identities:"
curl http://$ip/identities
echo "Get schema:"
curl http://$pip/schemas/default
echo "Create ID:"
json='{
"schema_id": "default",
"traits": {
"email": "test@greenhost.nl",
"name": {
"first": "Dave",
"last": "Stanley"
}
}
}'
curl -d "$json" -X POST http://$ip/identities
echo "Update an id"
id=af9b4abc-6308-48e2-abda-04e664487cf9
json='{
"schema_id": "default",
"traits": {
"email": "test@greenhost.nl",
"name": {
"first": "Dave",
"last": "Stanley"
},
"totp": "12345"
}
}
'
curl -d "$json" -X PUT http://$ip/identities/$id