Hi all :slightly_smiling_face: I am currently eval...
# ory-selfhosting
b
Hi all 🙂 I am currently evaluating Ory Kratos as a candidate for a large logistic company's user-management needs. I am unable to determine the idiomatic or de-facto way to check if a user (identity) is making a request with an active, valid session. What would you recommend? Fetch all sessions, get latest, check active and expiration? Get identity, check status? TIA
m
Hello Parker, If I understand you, the best way for you would be to call /whoami https://www.ory.sh/docs/reference/api#tag/frontend/operation/toSession See also this document: https://www.ory.sh/docs/security-model and a bit on a tangent this blogpost https://www.ory.sh/auth-and-modern-software/
🙌 1
b
Thanks @magnificent-energy-493 . Is there a plan to add explicit support for this endpoint in the elixir client?
m
All endpoints documented here https://www.ory.sh/docs/reference/api should be usable in all SDKs, so also the Elixir one. I think should be https://github.com/ory/sdk/blob/6fc20a236f78d6e6b34d0fc2d567e4ff5193c37f/clients/kratos/elixir/lib/ory/api/frontend.ex#L748 Is that what you were looking for?
🙌 1
b
Ahh perfect. Thanks, and sorry I missed it 🙏
👍 1