From 4c9400e6460a73baa2d687afe73a62c6efca9f37 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 24 Oct 2011 21:34:44 +0100 Subject: 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 --- .../Services/Interfaces/IAuthenticationService.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAuthenticationService.cs b/OpenSim/Services/Interfaces/IAuthenticationService.cs index 9de261b..cee8bc0 100644 --- a/OpenSim/Services/Interfaces/IAuthenticationService.cs +++ b/OpenSim/Services/Interfaces/IAuthenticationService.cs @@ -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 ToKeyValuePairs() + { + Dictionary result = new Dictionary(); + 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 // -- cgit v1.1