
auth_google.pl -- Enable login with Google
This module allows for configures login with Google. To enable this
module:
- Follow these
steps to
create a Google project and get
- COPY this file to
config-enabled
- EDIT the following server attributes (near the end of this file)
- redirect_uri: the location of your swish server.
- client_id: the client id you obtained from Google.
- client_secret: the client secret you obtained from Google.
oauth2:login(+Request, +ServerID, +TokenInfo)[multifile]- Called after the identity provider behind ServerID verified the
user's identity. Now we have several options. If we do not have our
own user admin, we associate the session with the user and we are
done. If we have our own admin we have to check with our profile
database. For new users we may wish to complete the profile. We may
want to reject banned users or users that do not wish to complete
their profile.
swish_config:user_info(+Request, ?Server, -Info:dict) is semidet[multifile]- True if Info represents describes the currently logged in user.
oauth2:server_attribute(?ServerID, ?Attribute, ?Value)[multifile]- Declare properties of an oauth2 identity provider. The values below
are for a Unity server.
- See also
- - swish(lib/oauth2) for a description of the attributes.