Resolves the caller from the request: an Effect, so it may ask a token
store. Failing with Unauthenticated refuses it, a 401 carrying reason;
a defect is a 500 that says nothing of it, logged. It needs nothing:
provide what it reads (a session store) from a context built once, not
per request. It runs in a fiber of its own, outside an httpApp
request's, so a client that leaves does not interrupt it.
The principal comes from here and nowhere else: a principal taken from
request params would let any caller claim any identity.
A stable identity for a principal, used to bind a session to its creator.
Defaults to a structural key, so an authenticate that returns a fresh
object per request still matches its own session. Supply this when a
principal carries fields that differ between requests of the same caller,
such as an issued-at or a token id.
Origins a browser may call from. A request carrying an Origin that is not
listed is refused, which is what stops a page on another site from driving
a local server through DNS rebinding.