Add optional getauthinfo and setauthinfo authentication service calls.

These are disabled by default, as before.  Please only turn these on in secure grids, since they allow the same facilities as the existing SetPassword call (also disabled by default)
These facilities can be helpful when integrating external systems, in addition to the existing option of adapting an IAuthenticationService or using WebLoginKey
This commit is contained in:
Justin Clark-Casey (justincc)
2011-10-24 21:34:44 +01:00
parent b868328d51
commit 4c9400e646
9 changed files with 193 additions and 5 deletions

View File

@@ -26,10 +26,32 @@
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;
namespace OpenSim.Services.Interfaces
{
public class AuthInfo
{
public UUID PrincipalID { get; set; }
public string AccountType { get; set; }
public string PasswordHash { get; set; }
public string PasswordSalt { get; set; }
public string WebLoginKey { get; set; }
public Dictionary<string, object> ToKeyValuePairs()
{
Dictionary<string, object> result = new Dictionary<string, object>();
result["PrincipalID"] = PrincipalID;
result["AccountType"] = AccountType;
result["PasswordHash"] = PasswordHash;
result["PasswordSalt"] = PasswordSalt;
result["WebLoginKey"] = WebLoginKey;
return result;
}
}
// Generic Authentication service used for identifying
// and authenticating principals.
// Principals may be clients acting on users' behalf,
@@ -76,6 +98,10 @@ namespace OpenSim.Services.Interfaces
//
bool SetPassword(UUID principalID, string passwd);
AuthInfo GetAuthInfo(UUID principalID);
bool SetAuthInfo(AuthInfo info);
//////////////////////////////////////////////////////
// Grid
//