mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
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:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user