1.1.5 • Published 1 year ago

@octoguide/auth-utils v1.1.5

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
1 year ago

Constants

isAuthenticated

check if the session user is authenticated

Kind: global constant

setStorageItem

generic set storage item - works in a dom context

Kind: global constant

ParamTypeDescription
itemstringthe storage item to set
valuestringthe storage item value

getStorageItem

generic get storage item - works in a dom context

Kind: global constant

ParamTypeDescription
itemstringthe storage item to get

removeStorageItem

generic remove storage item - works in a dom context

Kind: global constant

ParamTypeDescription
itemstringthe storage item to remove

getAuth

get the auth storage item value - works in a dom context

Kind: global constant

setAuth

set the auth item in storage - works in a dom context

Kind: global constant

ParamTypeDescription
authObjectthe storage object to set

setIdentity

set the identity item in storage - works in a dom context

Kind: global constant

ParamTypeDescription
identityObjectthe storage object to set

getIdentityRole

get the identity item role value - works in a dom context

Kind: global constant

getIdentityId

get the identity item id value - works in a dom context

Kind: global constant

getIdentityOrgId

get the identity item orgid value - works in a dom context

Kind: global constant

getIdentityName

get the identity item role name - works in a dom context

Kind: global constant

getSelectedPortfolio

get the identity item portfolio value - works in a dom context

Kind: global constant

invalidateSession

clear all session values, big reset - works in a dom context

Kind: global constant

isTokenExpired

checks if the token has expired checking against the current datetime

Kind: global constant

ParamTypeDescription
tokenObjectthe token to validate

extractTokenId

when the id is returned from post requests - extract the id to put back into the payload

Kind: global constant

isSuperUser

checks if the current identity role is super user

Kind: global constant

isAdmin

checks if the current identity role is admin

Kind: global constant

isOrg

checks if the current identity id is the organaisation - not an employee

Kind: global constant

getRoleName

gets the current identity role

Kind: global constant

generateGuid

generate a unique record uid

Kind: global constant

getBasicAuthorizationHeader

generate a basic auth header

Kind: global constant

ParamTypeDescription
usernamestringthe username to use
passwordstringthe password to use
1.1.5

1 year ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago