<div dir="ltr">Thank you for the help, it's appreciated.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Dec 5, 2024 at 5:43 AM Slawek Figiel <<a href="mailto:slawek@isc.org">slawek@isc.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Shamir!<br>
<br>
The Stork server requires providing three items to create a session:<br>
<br>
- authenticationMethodId<br>
- identifier<br>
- secret<br>
<br>
The meaning of the identifier and secret depends on the authentication <br>
method. The built-in authentication method is called "internal." It uses <br>
the credentials stored in the Stork database to authenticate users. In <br>
this case, the identifier is a user email or login, and the secret is a <br>
user password.<br>
<br>
Below is a snippet of how you can create a session in Python:<br>
<br>
```<br>
import requests<br>
<br>
session = requests.Session()<br>
credentials = {<br>
"authenticationMethodId": "internal",<br>
"identifier": "admin",<br>
"secret": "admin",<br>
}<br>
<a href="http://session.post" rel="noreferrer" target="_blank">session.post</a>("<a href="http://server:8080/api/sessions" rel="noreferrer" target="_blank">http://server:8080/api/sessions</a>", json=credentials)<br>
return session<br>
```<br>
<br>
Regards,<br>
Slawek Figiel<br>
<br>
On 04/12/2024 21:51, Shamir Ramji wrote:<br>
> Hi,<br>
><br>
> Hoping someone can help me out. I'm trying to hit the api and create a<br>
> cookie by calling /sessions, but it requires a "identifer" and a<br>
> "secret". Does anyone know where I can find that info?<br>
><br>
> Thanks.<br>
><br>
> --<br>
><br>
><br>
> /The contents of this message and any attachment(s) are confidential,<br>
> proprietary to the City of Edmonton, and are intended only for the<br>
> addressed recipient. If you have received this in error, please<br>
> disregard the contents, inform the sender of the misdirection, and<br>
> remove it from your system. The copying, dissemination, or distribution<br>
> of this message, if misdirected, is strictly prohibited./<br>
><br>
<br>
<br>
On 04/12/2024 21:51, Shamir Ramji wrote:<br>
> Hi,<br>
> <br>
> Hoping someone can help me out. I'm trying to hit the api and create a <br>
> cookie by calling /sessions, but it requires a "identifer" and a <br>
> "secret". Does anyone know where I can find that info?<br>
> <br>
> Thanks.<br>
> <br>
> -- <br>
> <br>
> <br>
> /The contents of this message and any attachment(s) are confidential, <br>
> proprietary to the City of Edmonton, and are intended only for the <br>
> addressed recipient. If you have received this in error, please <br>
> disregard the contents, inform the sender of the misdirection, and <br>
> remove it from your system. The copying, dissemination, or distribution <br>
> of this message, if misdirected, is strictly prohibited./<br>
> <br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><img src="https://ci3.googleusercontent.com/mail-sig/AIorK4wM1QO4j2B9N-jJRrrei5H2LTVJ73S_dqZwiFrtQoyLpvZ_r4ITQiAQqwrTtSSVmobY5zsgZrAlKLVN"><br></div></div>
<br>
<font color="#222222" face="Arial, sans-serif"><span style="font-size:12px"><i>The contents of this message and any attachment(s) are confidential, proprietary to the City of Edmonton, and are intended only for the addressed recipient. If you have received this in error, please disregard the contents, inform the sender of the misdirection, and remove it from your system. The copying, dissemination, or distribution of this message, if misdirected, is strictly prohibited.</i></span></font>