[not loaded]
http_authenticate.pl -- SWISH login management
This module provides basic login and password management facilities for
SWISH. You can create an authenticated SWISH server by
- Loading this library
- Add one or more users to the passwd file using swish_add_user/0
?- swish_add_user.
User name: Bob
Real name: Bob de Bouwer
Group: user
E-mail: bob@bouwer.com
Password:
(again):
true.
Authentication is by default based on HTTP digest authentication, which
uses a challenge-response to avoid exchanging the plain password and
uses sequence numbers to avoid replaying actions. This basically
protects non-authorized users from entering commands, but does not
encrypt the communication.
login(+Request, -User) is det- Perform a login
swish_config:config(?Key, ?Value, +Options) is nondet[multifile]- Make the user available as config.swish.user. This value is
provided if the user must login for any access to swish.
Optional login is handled by
update
in login.js
which calls
the HTTP handler user_info
.
swish_config:authenticate(+Request, -User)[multifile]- Called for all SWISH actions. May be used to restrict all
access. Access can only be denied by throwing an exception.
swish_current_user(?User, -Dict) is nondet- True if User is a user with properties.
swish_logged_in(+Request, -User, -UserData) is semidet- True when Request is associated with User.
swish_config:login_item(-Server, -Item)[multifile]
swish_config:login(+Server, +Request)[multifile]- Handler to deal with local HTTP based login.
swish_config:user_info(+Request, -Server, -UserInfo) is semidet[multifile]- True when UserInfo describes the currently http-authenticated user.
swish_add_user(+User, +Passwd, +Fields) is det- Add a new user to the SWISH password file. Defined Fields are
(in this order):
- Group identifies the user group (not used)
- Real name is the common name of the user
- EMail is the user's e-mail address (not used)
swish_add_user- Interactively add a user to the SWISH password file.
swish_add_user(+Data:dict) is det- Add a user from Data.