PublicShow 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.
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 current_user_info(+Request, -Info) is semidet
If there is a logged in user, Info is a dict with information about this user.

Undocumented predicates

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

Source reply_logged_out_page(Arg1)