Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Open Simulator Technical Help
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
OpenSimulator Internals/Connector Architecture/UserAccount Connector
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= OpenSimulator Internals/Connector Architecture/UserAccount Connector = == Overview == UserAccountServicesConnector is the simulator-side remote connector for IUserAccountService. It translates IUserAccountService calls into HTTP POST requests to the ROBUST UserAccount handler at /accounts. Source file: OpenSim/Services/Connectors/UserAccountServicesConnector.cs ---- === Initialisation === Config section: [UserAccountService] Required key: * UserAccountServerURI -- URL of the ROBUST UserAccount endpoint; throws if missing or unresolvable Base class BaseServiceConnector.Initialise() called for auth setup. Three constructors: * Default (no args) -- URI must be set externally * String URI -- used by callers that pass the URI directly * IConfigSource -- calls Initialise(), normal grid mode ---- === Transport === All methods POST to m_ServerURI + "/accounts" using SynchronousRestFormsRequester. All requests include: * VERSIONMIN / VERSIONMAX -- protocol version negotiation * METHOD -- identifies the operation Two internal helpers: SendAndGetReply() -- used by single-account GET methods and StoreUserAccount(): * POSTs, parses XML response * Returns UserAccount constructed from result dictionary, or null SendAndGetBoolReply() -- defined but not called by any method in this file. Dead code. ---- === Methods === {| class="wikitable" ! Method !! METHOD field !! Notes |- | GetUserAccount(scopeID, firstName, lastName) || "getaccount" || Lookup by name |- | GetUserAccount(scopeID, email) || "getaccount" || Lookup by email |- | GetUserAccount(scopeID, userID) || "getaccount" || Lookup by UUID |- | GetUserAccounts(scopeID, query) || "getaccounts" || Search by name fragment; returns List<UserAccount> |- | GetUserAccounts(scopeID, List<string> IDs) || "getmultiaccounts" || Batch lookup by UUID list; falls back to one-by-one if server returns "Failure" |- | StoreUserAccount(data) || "setaccount" || Serializes UserAccount via ToKeyValuePairs(); returns true if result is non-null |- | CreateUser(first, last, password, email, scopeID) || "createuser" || Remote user creation; not part of IUserAccountService interface |- | InvalidateCache(userID) || (none) || No-op -- cache invalidation not implemented for remote connector |- | GetUserAccountsWhere(scopeID, where) || (none) || Always returns null -- not implemented for regions |} GetUserAccounts(List<string> IDs) fallback: * Tries "getmultiaccounts" first * If result == "Failure": sets suported = false, falls back to calling GetUserAccount(scopeID, uuid) one by one * Skips IDs that are not valid non-zero UUIDs in the fallback path ---- === Notes === * CreateUser() has a bug: the email field sends first name instead of the email value. The line reads sendData["Email"] = first rather than sendData["Email"] = email. * SendAndGetBoolReply() is defined but never called -- dead code. * InvalidateCache() is a no-op -- the remote connector has no local cache to invalidate. * GetUserAccountsWhere() returns null unconditionally -- SQL WHERE clause queries are not supported over HTTP. * ScopeID fields are present in the code but some are commented out. ---- == See Also == * [[OpenSimulator Internals/Connector Architecture]] * [[OpenSimulator Internals/Code Map/ROBUST/UserAccountService]] * [[OpenSimulator Internals/Code Map/Shared]]
Summary:
Please note that all contributions to Open Simulator Technical Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Open Simulator Technical Help:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
OpenSimulator Internals/Connector Architecture/UserAccount Connector
Add topic