1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using OpenMetaverse;
- using OpenSim.Framework;
- using OpenSim.Data;
- namespace OpenSim.Data.Null
- {
- public class NullAuthenticationData : IAuthenticationData
- {
- private static Dictionary<UUID, AuthenticationData> m_DataByUUID = new Dictionary<UUID, AuthenticationData>();
- private static Dictionary<UUID, string> m_Tokens = new Dictionary<UUID, string>();
- public NullAuthenticationData(string connectionString, string realm)
- {
- }
- public AuthenticationData Get(UUID principalID)
- {
- if (m_DataByUUID.ContainsKey(principalID))
- return m_DataByUUID[principalID];
- return null;
- }
- public bool Store(AuthenticationData data)
- {
- m_DataByUUID[data.PrincipalID] = data;
- return true;
- }
- public bool SetDataItem(UUID principalID, string item, string value)
- {
-
- return false;
- }
- public bool SetToken(UUID principalID, string token, int lifetime)
- {
- m_Tokens[principalID] = token;
- return true;
- }
- public bool CheckToken(UUID principalID, string token, int lifetime)
- {
- if (m_Tokens.ContainsKey(principalID))
- return m_Tokens[principalID] == token;
- return false;
- }
- }
- }
|