HomeyAPI~ManagerSessions.Session

Properties:
Name Type Description
id string
type string ("OAUTH" | "APP")
agent string
scopes Array.<string> These are the requested scopes
intersectedScopes Array.<string> These are the actual available scopes. This is an intersection between the requested scopes and the user's scopes.
createdAt string
expiresAt string
lastUsed boolean

Methods

hasScope(scope) → {boolean}

Checks if this session has a scope
Parameters:
Name Type Description
scope string The required scope
Returns:
boolean - true if the scope is available, false otherwise

hasScopes(scopes) → {boolean}

Checks if this session has all of the supplied scopes
Parameters:
Name Type Description
scopes Array.<string> A list of required scopes
Returns:
boolean - true if the scopes are available, false otherwise