I am creating an API for web with prolog. The user will sign in with their name, and I would like the API to remember the user throughout session until user logs off, or shuts down API. This will of course have to be different for each unique user. My question is how would I write that in prolog as an assert/2, or...?
Use library(http/http_session)
to create sessions and access session specific information. See
http://www.swi-prolog.org/pldoc/doc/home/vnc/prolog/lib/swipl/library/http/http_session.pl
There is a number of ways to record this information, including: