IdP
The IdP Service is responsible for doing Identity Provider actions like user login, logout, pairing, ...
Details
All of this data will be compliant with the Elevate Vikimap Model as defined in the models section
Available methods
loginByCredentials()
: Credentials Login ServiceloginByPairingCode()
: Pairing Code Login ServicevalidateUser()
: Validade User Servicelogout()
: Logout ServicegetPairingCode()
: Pairing Code ServiceforgotPassword()
: Forgot Password ServicegetProfile()
: Profile management - get profile by idgetProfiles()
: Profile management - get all profilecreateProfile()
: Profile management - add a new profileupdateProfileAvatar()
: Profile management - update profile avatar by profile idupdateProfileName()
: Profile management - update profile name by profile iddeleteProfile()
: Profile management - delete profile by idgetAvatars()
: Profile management - get all avatarscreatePIN()
: Profile management - setup a pin for the profile by profile idupdatePIN()
: Profile management - update pin by profile iddeletePIN()
: Profile management - remove pin by profile id
Associated Context
The application includes an idP related Context: AuthContext
that handle all the user related state and actions, so the Service shouldn't be used directly
Example usage
import React, { useContext } from 'react';
[...]
import { AuthContext } from '#/context/AuthContext';
[...]
const authContext = useContext(AuthContext);
[...]
const { byCredentials } = authContext.login();
byCredentials(username, password).catch(() => {
[...]
});