User
Interfaces
UserTokens
UserTokens
Members
The BaseAuth
implementation that was used to create this object.
accessToken : string?
accessToken : string?
This user's OpenID access token.
refreshToken : string?
refreshToken : string?
This user's OpenID refresh token.
idToken : string?
idToken : string?
This user's OpenID identification token.
tokenType : string?
tokenType : string?
The type of the access token.
expiresAt : number?
expiresAt : number?
The time when the access token expires.
The OrganizationApi
object that is associated with this user.
The ProfileApi
object that is associated with this user.
Methods
constructor(api,tokens)
constructor(api,tokens)
Create a user object that interacts with the Vulos Identity API on behalf of a user.
The
api
argument should be aBaseAuth
implementation;The
tokens
argument should be a token set that implements theUserTokens
interface.
See BaseAuth
for more information.
save()
save()
Save the token set user to a serializable object that implements the UserTokens
interface.
This function can be used if you want to store the user tokens in a database.
The tokens might update on any API call, so make sure you call this if you want to preserve the tokens.
async reference()
async reference()
Create a UserReference
object that is associated with this user.
async info()
async info()
Get the UserInfo
object for this user.
async getOrganizationMemberships()
async getOrganizationMemberships()
Get all the OrganizationMembership
objects for this user's organizations.
async createOrganization(details)
async createOrganization(details)
Create a new organization with a details
object that implements the OrganizationCreateDetails
interface.
async organizationSearch(search, amount, offset)
async organizationSearch(search, amount, offset)
This function is an alias to User.profileApi.organizationSearch()
.
The only difference is that this function doesn't throw, but returns false
on failure.
async getAccessToken()
async getAccessToken()
Get the access token of the user.
This function will automatically attempt to refresh the access token if it is expired.
Last updated