Did you know ... Search Documentation:
openid.pl -- Handle users of the SWI-Prolog website
PublicShow source

This module provide the OpenID interface for the SWI-Prolog website. If you want to run this for local installations, make sure that your server is accessible through the public network and first direct your browser to the public network. Logging in using Google should work than. Some other providers have more strict requirements.

You can fake OpenID login using the debug interface:

?- debug(openid_fake('WouterBeek')).
Source grant(+User, +Token) is det
Source revoke(+User, +Token) is det
Grant/revoke User (a UUID) the right to access Token.
Source authenticate(+Request, +Token, -Fields)
Get authentication for editing wiki pages. This now first tries the OpenID login.
Source site_user(+Request, -User)
Demand the user to be logged on and, if this is the first logon, verify the user and create a profile.
Source site_user_logged_in(-User) is semidet
True when User is logged on. Does not try to logon the user.
Source user_profile_link(+UUID)//
Create a link to the profile of a user.
Source yadis:xrds_specified_location(+Server, -XRDSLocation)[multifile]
Hacks to deal with broken Yadis support.
  • Google does not support Yadis discovery, but does have an XRSD document, so we fake its location.
  • stackexchange.com serves an OP Identifier Element instead of an Claimed Identifier Element when doing Yadis discovery on the real OpenID.
Source google_client:login_existing_user(+Claim) is semidet[multifile]
True if the user is know to us and thus we can perform the login without further interaction.
Source google_client:create_user(+Profile) is det[multifile]
Create a new user for the given Google Profile.
Source current_user//
Source login_link(+Request)//
Create a link to login, which returns to the current page.
Source redirect_master(+Request)
Redirect a request to the master server, so we do not have to deal with multiple versions of the database files.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

Source current_user(Arg1, Arg2, Arg3)
Source site_user_property(Arg1, Arg2)
Source revoke(Arg1, Arg2)