PublicShow sourceconfig.pl -- Make HTTP locations known to JSON code

Source swish_reply_config(+Request, +Options) is semidet
Emit a configuration object to the client if the client requests for '.../swish_config.json', regardless of the path prefix.
Source swish_config_hash(-Hash, +Options) is det
True if Hash is the SHA1 of the SWISH config.
Source config(-Key, -Value) is nondet[multifile]
Source swish_config(-Key, -Value) is nondet[multifile]
Define a name/value pair that will end up in the SWISH config object (see web/js/config.js)
 login_item(-Server, -Item) is nondet[multifile]
This hook is called to find all possible login options. It should bind Item to an HTML description for html//1 that must be clicked to login with this option. The item may have the following HTML attributes:
data-server(+Server)
This must be present and provides the first argument for the login/2 hook.
data-frame(+Style)
The login is realised in a popup to avoid reloading the current swish page. If Style is 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')
               ]).
Arguments:
Item- may be of the form Tag-Item. In this case the items are ordered by Tag. The default tag is 0.
 login(+Server, +Request) is det[multifile]
If a login item with 'data-server'(+Server) is clicked, the HTTP handler with id login is called. This handler figures the selected login server and calls this hook.
Source user_info(+Request, -Server, -UserInfo:dict) is semidet[multifile]
Each login facility must provide this hook. The hook should succeed if-and-only-if the user is logged in using this facility and the hook must bind UserInfo with a dict that contains the following fields:
user:User
User name (id) if the logged in user.
name:Name
Common name of the logged in user.
email:Email
Email address of the logged in user.
picture:URL
If present, URL is used to indicate the currently logged in user.
auth_method:Method
Authentication method used. Currently one of basic, digest or oauth2.
logout_url:URL
URL that must be used to logout. Needed if auth_method is not one of the HTTP authentication methods (basic or digest).

If this hook fails the user is not logged in.

Source source_alias(?Alias, ?Options) is nondet[multifile]
Multifile hook that defines properties of file_search_path/2 aliases wrt. storage handling. Defined options are:
access(Access)
One of read or both.
search(Pattern)
The New Tab search form searches in files that satisfy the given pattern in the matching directories. Pattern is handed to expand_file_name/2.