
config.pl -- Make HTTP locations known to JSON code
swish_reply_config(+Request, +Options) is semidet
swish_config_hash(-Hash, +Options) is det
swish_config_dict(-Config:dict, +Options) is det[private]
web_plugins(-Plugins, +Options) is det[private]
config(-Key, -Value) is nondet[multifile]
swish_config(-Key, -Value) is nondet[multifile]web/js/config.js)
login_item(-Server, -Item) is nondet[multifile]popup, a browser popup window
is used. This is necessary for identity providers that refuse to
open inside a frame. The default is iframe, which handles
the login inside an iframe element in a modal popup.
The Item is often an image. The image must have a class
login-with. Below is an example to login with Google:
swish_config:login_item(Item) :-
http_absolute_location(icons('social_google_box.png'), Img, []),
Item = img([ src(Img),
class('login-with'),
'data-server'(google),
title('Login with Google')
]).
login(+Server, +Request) is det[multifile]'data-server'(+Server) is clicked, the
HTTP handler with id login is called. This handler figures the
selected login server and calls this hook.
user_info(+Request, -Server, -UserInfo:dict) is semidet[multifile]basic, digest
or oauth2.auth_method is
not one of the HTTP authentication methods (basic or
digest).If this hook fails the user is not logged in.
source_alias(?Alias, ?Options) is nondet[multifile]read or both.