This class exposes Oasis Security’s vuex store, to allow the frontend applications to access its stored user data.
Get data as username, email, permission names the user has with the getters as follows:
import { OasisAuth } from '@oasis/security';
computed: {
...mapGetters(OasisAuth.STORE_MODULE_AUTH, {
userName: '@getters/getUsername',
email: '@getters/getEmail',
permissionStrings: '@getters/getPermissions',
}),
}
Oasis helper token is a class that exposes methods to get the user current session data.
Get the user ID token.
const idToken = OasisHelperToken.getTokenUser()
Or get the user ID token and refresh token
const { id, refresh } = OasisHelperToken.getTokenAuthData()
Get the user account ID
const accountId = OasisHelperToken.getAccountId()
Get the permissions ID (numbers) the user has.
const permissionIds = OasisHelperToken.getMavUserPermissionIds()
Oasis axios is an axios instance with an interceptor that refreshes the bearer token inside the outcoming request.