3.11 library(http/http_openid): OpenID consumer and server library
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP server libraries
          • library(http/http_openid): OpenID consumer and server library
            • openid_hook/1
            • openid_login/1
            • openid_logout/1
            • openid_logged_in/1
            • openid_user/3
            • openid_login_form//2
            • openid_verify/2
            • openid_server/3
            • openid_current_url/2
            • openid_current_host/3
            • ssl_verify/5
            • openid_authenticate/4
            • openid_server/2
            • openid_grant/1
            • openid_associate/3
            • openid_associate/4
Availability::- use_module(library(http/http_openid)).
Source[det]openid_user(+Request:http_request, -OpenID:url, +Options)
True if OpenID is a validated OpenID associated with the current session. The scenario for which this predicate is designed is to allow an HTTP handler that requires a valid login to use the transparent code below.
handler(Request) :-
      openid_user(Request, OpenID, []),
      ...

If the user is not yet logged on a sequence of redirects will follow:

  1. Show a page for login (default: page /openid/login), predicate reply_openid_login/1)
  2. By default, the OpenID login page is a form that is submitted to the verify, which calls openid_verify/2.
  3. openid_verify/2 does the following:

    • Find the OpenID claimed identity and server
    • Associate to the OpenID server
    • redirects to the OpenID server for validation

  4. The OpenID server will redirect here with the authetication information. This is handled by openid_authenticate/4.

Options:

login_url(Login)
(Local) URL of page to enter OpenID information. Default is the handler for openid_login_page/1
See also
openid_authenticate/4 produces errors if login is invalid or cancelled.