private OSDMap SetWebLoginKey(OSDMap map)
{
OSDMap resp = new OSDMap ();
UUID principalID = map["PrincipalID"].AsUUID();
UUID webLoginKey = UUID.Random();
IAuthenticationService authService = m_registry.RequestModuleInterface<IAuthenticationService>();
IAuthenticationData authData = Aurora.DataManager.DataManager.RequestPlugin<IAuthenticationData>();
if (authService != null && authData != null)
{
//Remove the old
authData.Delete(principalID, "WebLoginKey");
authService.SetPlainPassword(principalID, "WebLoginKey", webLoginKey.ToString());
resp["WebLoginKey"] = webLoginKey;
}
resp["Failed"] = OSD.FromString(String.Format("No auth service, cannot set WebLoginKey for user {0}.", map["PrincipalID"].AsUUID().ToString()));
return resp;
}