Am 12.12.22 um 16:39 schrieb Eric Graham:
Hi Stefan,

As far as I am aware, there's no token. Send a POST to /sessions and use the "session" cookie to authenticate, as so:

➜ curl -k -c cookie.txt -X POST -H 'Content-Type: application/json' https://127.68.45.99/api/sessions -d '{"useremail": "admin", "userpassword": "your password here"}'
{"email":"[email protected]","groups":[1],"id":2,"lastname":"Admin","login":"admin","name":"Test
 Admin"}

➜ cat cookie.txt
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

#HttpOnly_10.0.7.11     FALSE   /       FALSE   1670945665      session jWZUnuCYYhs6seDTKpliwnp4eIWHIA1ObVi_Ior_YYLk

➜ curl -k -X GET -H 'Content-Type: application/json' -b cookie.txt https://127.68.45.99/api/users
{"items":[{"email":"[email protected]","groups":[1],"id":2,"lastname":"Admin","login":"admin","name":"Test
 Admin"}],"total":1}

------------------------------------------------------------------------

Great, works here ... does that cookie have a lifetime, does it time out ?

thanks


--
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to