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')).
- grant(+User, +Token) is det
- revoke(+User, +Token) is det
- Grant/revoke User (a UUID) the right to access Token.
- grant_user(+Request)[private]
- HTTP handler to grant or revoke rights for a user.
- authenticate(+Request, +Token, -Fields)
- Get authentication for editing wiki pages. This now first tries
the OpenID login.
- 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.
- site_user_logged_in(-User) is semidet
- True when User is logged on. Does not try to logon the user.
- create_profile(+Request)[private]
- Create a new user profile, and on success return to the original
location.
- description(+UUID)//[private]
- Provide field for entering a description about the user.
- submit_profile(+Request)[private]
- Handle submission of the user profile
- view_profile(+Request) is det[private]
- HTTP handler showing the public profile for a user. Viewing
options:
Requested user is logged on | [view(private) , edit_link(true) ] |
Logged on is admin | [view(admin) ] |
Not logged on | [view(public) |
- private_profile(+UUID, +Options)// is det[private]
- If the user is viewing his/her own profile or the logged on user
has
admin
rights, show a table holding the private profile
information.
- user_description(UUID, +Options)// is det[private]
- Show user description
- user_packs(UUID)// is det[private]
- Show a filtered version of the pack table, holding the packs
created by this user.
- list_users(+Request)[private]
- HTTP handler to list known users.
- user_profile_link(+UUID)//
- Create a link to the profile of a user.
- 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.
- plweb_login_page(+Request)[private]
- HTTP handler that overrules the location
openid(login)
for
customizating the -very basic- login page.
- quick_buttons(-Buttons) is det[private]
- Create a list of
img(Attributes)
terms for quick login.
- verify_user(+Request)[private]
- HTTP handler for SWI-Prolog site login. Calls openid_verify,
asking for additional attribute exchange.
- login_with_google(+Request)[private]
- HTTP handler to login with Google.
- 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.
- google_client:create_user(+Profile) is det[multifile]
- Create a new user for the given Google Profile.
- logout(+Request)[private]
- Logout the current user. If openid.return_to is provided,
provide a back-link
- current_user//
- login_link(+Request)//
- Create a link to login, which returns to the current page.
- logout_link//[private]
- Create a link to logout
- redirect_master(+Request)
- Redirect a request to the master server, so we do not have to
deal with multiple versions of the database files.
Re-exported predicates
The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
- grant(+User, +Token) is det
- revoke(+User, +Token) is det
- Grant/revoke User (a UUID) the right to access Token.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- current_user(Arg1, Arg2, Arg3)
- site_user_property(Arg1, Arg2)