All predicatesShow sourceprofile.pl -- User profile configuration

Complementary to authentication, this module configures the maintenance of user profiles.

There are several places where we need interaction with the user profile:

Source swish_config:reply_logged_in(+Options)[multifile]
Hook logins from federated identity provides. Options processed:
user_info(+UserInfo:Dict)
Provides information about the user provided by the external identity provider.
reply(+Format)
If Format = html, reply with an HTML page. Other values are left for future extensions.
profile_id(-Id)
Unify Id with the found or created profile id.
Source known_profile(+Info, -ProfileID) is semidet[private]
True when ProfileID is the profile identifier for the authenticated user.
Source associate_profile(+ProfileID) is det[private]
Associate the current session with the given ProfileID. Broadcasts SWISH event profile(ProfileID).
Source init_session_profile[private]
This deals with the case where a session is opened, but login is continued because it is based on HTTP authentication. If the server opens a session, we check for the current identity and associate the related profile.
Source swish_config:reply_logged_out(+Options)[multifile]
Perform a logout, removing the link to the session
Source create_profile(+UserInfo, +IDProvider, -ProfileID)[private]
Create a new user profile.
Source last_login(+User)//[private]
Indicate when the user used this server for the last time.
Source swish_config:user_profile(+Request, -Profile) is semidet[multifile]
Provide the profile for the current user. The Profile dict contains the profile keys and the profile_id key.
Source user_profile(+Request)[private]
Emit an HTML page that allows for viewing, updating and deleting a user profile.
Source save_profile(+Request)[private]
Update the profile for the current user. The form sends a JSON object that contains a value for all non-disabled fields that have a non-null value.
Source save_profile(+User, +Dict) is det[private]
Update the profile for User with values from Dict.
Source update_profile(+Request)[private]
Update a profile with new information from the identity provider
Source delete_profile(+Request)[private]
Completely delete the profile for the current user
Source profile_name(+ProfileID, -Name) is semidet[private]
Name is the public name associated with Profile.
Source swish_search:typeahead(+Set, +Query, -Match, +Options) is nondet[multifile]
Find users based on their profile. This handler defines the set user. A Match is a dict holding:
id:ProfileID
label:Name
A reasonable name for the user
email:Email
Only present if the match was found on the email.
hit:hit{key:Key, value:Value}
Field key and value on which the hit was found
avatar:Avatar
Avatar URL