Looks like it times out after the default of 24 hours, but can be renewed if 
you authenticate again.

Defined here: 
https://gitlab.isc.org/isc-projects/stork/-/blob/aa1036c20dd32eaeaa9675b329d8b704dbeeb718/backend/server/database/session/session_manager.go#L23

Default defined here: 
https://pkg.go.dev/github.com/alexedwards/scs/v2#SessionManager



Eric Graham

DevOps Specialist

Main: 605.995.1777

[email protected]<mailto:[email protected]>


[cid:0f13ce25-3560-468c-bb93-d2addb327210]


Mitchell | Portland | Colorado Springs | San Antonio | Sioux Falls | 
Springfield | Charlotte

________________________________
From: Kea-users <[email protected]> on behalf of Stefan G. 
Weichinger <[email protected]>
Sent: Tuesday, December 13, 2022 2:26 AM
To: [email protected] <[email protected]>
Subject: Re: [Kea-users] Stork API Key

CAUTION: This email originated outside the organization. Do not click any links 
or attachments unless you have verified the sender.

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
-- 
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