README
Constants
- isAuthenticated
check if the session user is authenticated
- setStorageItem
generic set storage item - works in a dom context
- getStorageItem
generic get storage item - works in a dom context
- removeStorageItem
generic remove storage item - works in a dom context
- getAuth
get the auth storage item value - works in a dom context
- setAuth
set the auth item in storage - works in a dom context
- setIdentity
set the identity item in storage - works in a dom context
- getIdentityRole
get the identity item role value - works in a dom context
- getIdentityId
get the identity item id value - works in a dom context
- getIdentityOrgId
get the identity item orgid value - works in a dom context
- getIdentityName
get the identity item role name - works in a dom context
- getSelectedPortfolio
get the identity item portfolio value - works in a dom context
- invalidateSession
clear all session values, big reset - works in a dom context
- isTokenExpired
checks if the token has expired checking against the current datetime
- extractTokenId
when the id is returned from post requests - extract the id to put back into the payload
- isSuperUser
checks if the current identity role is super user
- isAdmin
checks if the current identity role is admin
- isOrg
checks if the current identity id is the organaisation - not an employee
- getRoleName
gets the current identity role
- generateGuid
generate a unique record uid
- getBasicAuthorizationHeader
generate a basic auth header
isAuthenticated
check if the session user is authenticated
setStorageItem
generic set storage item - works in a dom context
Kind: global constant
Param | Type | Description |
---|---|---|
item | string |
the storage item to set |
value | string |
the storage item value |
getStorageItem
generic get storage item - works in a dom context
Kind: global constant
Param | Type | Description |
---|---|---|
item | string |
the storage item to get |
removeStorageItem
generic remove storage item - works in a dom context
Kind: global constant
Param | Type | Description |
---|---|---|
item | string |
the storage item to remove |
getAuth
get the auth storage item value - works in a dom context
setAuth
set the auth item in storage - works in a dom context
Kind: global constant
Param | Type | Description |
---|---|---|
auth | Object |
the storage object to set |
setIdentity
set the identity item in storage - works in a dom context
Kind: global constant
Param | Type | Description |
---|---|---|
identity | Object |
the storage object to set |
getIdentityRole
get the identity item role value - works in a dom context
getIdentityId
get the identity item id value - works in a dom context
getIdentityOrgId
get the identity item orgid value - works in a dom context
getIdentityName
get the identity item role name - works in a dom context
getSelectedPortfolio
get the identity item portfolio value - works in a dom context
invalidateSession
clear all session values, big reset - works in a dom context
isTokenExpired
checks if the token has expired checking against the current datetime
Kind: global constant
Param | Type | Description |
---|---|---|
token | Object |
the token to validate |
extractTokenId
when the id is returned from post requests - extract the id to put back into the payload
isSuperUser
checks if the current identity role is super user
isAdmin
checks if the current identity role is admin
isOrg
checks if the current identity id is the organaisation - not an employee
getRoleName
gets the current identity role
generateGuid
generate a unique record uid
getBasicAuthorizationHeader
generate a basic auth header
Kind: global constant
Param | Type | Description |
---|---|---|
username | string |
the username to use |
password | string |
the password to use |