All predicatesShow sourcelogin.pl -- SWISH login support

This module provides the generic code to deal with optional login using multiple protocols. Optional means that SWISH may be used both anonymously and after login.

This module cooperates with web/js/login.js. Login providers are defined using configuration hooks. The various login options are accompagnied by configuration files in config-available.

Source swish_config:li_login_button(+Options)//[multifile]
Hook called from page.pl to include the login buttons.
Source login_button(+Options)//
Add a login/logout button. This button is added if there is at least one option for optional login.
 login_items(+Items)[private]
Show the login options. If there is only one, we just show a login field.
Source reply_logged_in(+Options) is det
Source reply_logged_in_page(+Options) is det
Reply with an HTML document that the login succeeded. This is normally called from the protocol-specific login handler to indicate that the login succeeded. Options:
identity_provider(+Provider)
Indicate the identity provider that did the login. Provider is a term for html//1.
user(+User)
User id of the identified user.
name(+Name)
Common name of the identified user.
user_info(+Dict)
Information provided by the identity provider.

At least one of user(User) or name(Name) must be present.

The predicate reply_logged_in/1 calls the hook swish_config:reply_logged_in/1. This hook is provided for interacting with a user profile manager.

Source login_continue_button//
The login page is opened either inside an iframe inside a SWISH modal dialog or inside a browser popup window. This scripts adds a button to dismiss the browser popup window.
Source reply_logged_out(+Options)
Perform pluggable logout
Source swish_login(+Request)[private]
HTTP handler that deals with login. This handler is called from web/js/login.js which adds the selected login server from the data-server attribute.
Source user_info(+Request)[private]
HTTP handler to obtain information on the currently logged in user. This handler tries the clauses dealing with login for a specific protocol. This is called by login.update() from login.js.
Source current_user_info(+Request, -Info) is semidet
If there is a logged in user, Info is a dict with information about this user.

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.

Source reply_logged_in(+Options) is det
Source reply_logged_in_page(+Options) is det
Reply with an HTML document that the login succeeded. This is normally called from the protocol-specific login handler to indicate that the login succeeded. Options:
identity_provider(+Provider)
Indicate the identity provider that did the login. Provider is a term for html//1.
user(+User)
User id of the identified user.
name(+Name)
Common name of the identified user.
user_info(+Dict)
Information provided by the identity provider.

At least one of user(User) or name(Name) must be present.

The predicate reply_logged_in/1 calls the hook swish_config:reply_logged_in/1. This hook is provided for interacting with a user profile manager.

Undocumented predicates

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

Source reply_logged_out_page(Arg1)