Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
TheAccountServices
API provides functions that give information on user connectivity, visibility, and
asset download progress.Properties
Name | Type | Summary |
---|---|---|
username | string |
The user name of the user logged in. If there is no user logged in, it is
|
loggedIn | boolean |
|
findableBy | string |
The user's visibility to other users:
|
metaverseServerURL | string |
The metaverse server that the user is authenticated against when logged in
— typically |
Methods
Name | Return Value | Summary |
---|---|---|
checkAndSignalForAccessToken
|
boolean |
The function returns the login status of the user and prompts the user to log in (with a login dialog) if they're not already logged in. |
getDownloadInfo
|
AccountServices.DownloadInfoResult |
Gets information on the download progress of assets in the domain. |
isLoggedIn
|
boolean |
Checks whether the user is logged in. |
logOut
|
None |
Logs the user out. |
updateAuthURLFromMetaverseServerURL
|
None |
Updates Directory Server URL in AccountManager. It's called by Login window after Directory Server URL is changed. |
updateDownloadInfo
|
None |
Triggers a downloadInfoChanged signal with information on the current download progress of the assets in the domain. |
Signals
Name | Summary |
---|---|
connected
|
Not currently used. |
disconnected
|
Triggered when the user logs out. |
downloadInfoChanged
|
Triggered when the download progress of the assets in the domain changes. |
findableByChanged
|
Triggered when the user's visibility to others changes. |
loggedInChanged
|
Triggered when the login status of the user changes. |
myUsernameChanged
|
Triggered when the username logged in with changes, i.e., when the user logs in or out. |
Type Definitions
DownloadInfoResult Type: object |
|||||||||
---|---|---|---|---|---|---|---|---|---|
Information on the assets currently being downloaded and pending download. Properties
|
Method Details
(static) checkAndSignalForAccessToken( ) → {boolean}
Returns: true if the user is logged in, false if not.
|
---|
The function returns the login status of the user and prompts the user to log in (with a login dialog) if they're not already logged in. |
(static) getDownloadInfo( ) → {AccountServices.DownloadInfoResult}
Returns: Information on the download progress of assets. |
---|
Gets information on the download progress of assets in the domain. |
(static) isLoggedIn( ) → {boolean}
Returns: true if the user is logged in, false if not.
|
---|
Checks whether the user is logged in. Example
|
(static) logOut( ) |
---|
Logs the user out. |
(static) updateAuthURLFromMetaverseServerURL( ) |
---|
Updates Directory Server URL in AccountManager. It's called by Login window after Directory Server URL is changed. |
(static) updateDownloadInfo( ) |
---|
Triggers a downloadInfoChanged signal with information on the current download progress of the assets in the domain. |
Signal Details
connected(
)
Returns: Signal |
---|
Not currently used. |
disconnected(
reason
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when the user logs out. Parameters
|
downloadInfoChanged(
downloadInfo
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when the download progress of the assets in the domain changes. Parameters
|
findableByChanged(
findableBy
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when the user's visibility to others changes. Parameters
Example
|
loggedInChanged(
loggedIn
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when the login status of the user changes. Parameters
Example
|
myUsernameChanged(
username
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when the username logged in with changes, i.e., when the user logs in or out. Parameters
Example
|