From ce7de3581cd678dd09227bdfde94fefb779f5a86 Mon Sep 17 00:00:00 2001 From: diva Date: Wed, 17 Jun 2009 03:52:39 +0000 Subject: Implementation of a simple authentication service + in connector in route to making HGInventory (client access) work in standalone again. This is the refactoring of what was/is there, but done in the new model. Not complete yet, but key authentication works. It should be enough to make HGInventory work again soon. --- .../Services/Interfaces/IAuthenticationService.cs | 30 ++++++++++++++-------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAuthenticationService.cs b/OpenSim/Services/Interfaces/IAuthenticationService.cs index 35831c1..fa45cbc 100644 --- a/OpenSim/Services/Interfaces/IAuthenticationService.cs +++ b/OpenSim/Services/Interfaces/IAuthenticationService.cs @@ -30,31 +30,39 @@ using OpenMetaverse; namespace OpenSim.Services.Interfaces { + // Generic Authentication service used for identifying + // and authenticating principals. + // Principals may be clients acting on users' behalf, + // or any other components that need + // verifiable identification. + // public interface IAuthenticationService { - // Create a new user session. If one exists, it is cleared + // Check the pricipal's password // - UUID AllocateUserSession(UUID userID); + bool Authenticate(UUID principalID, string password); - // Get a user key from an authentication token. This must be - // done before the session allocated above is considered valid. - // Repeated calls to this method with the same auth token will - // create different keys and invalidate the previous ne. + // Get a service key given that principal's + // authentication token (master key). // - string GetUserKey(UUID userID, string authToken); + string GetKey(UUID principalID, string authToken); - // Verify that a user key is valid + // Verify that a principal key is valid // - bool VerifyUserKey(UUID userID, string key); + bool VerifyKey(UUID principalID, string key); + + // Create a new user session. If one exists, it is cleared + // + UUID AllocateUserSession(UUID userID); // Verify that a user session ID is valid. A session ID is // considered valid when a user has successfully authenticated // at least one time inside that session. // - bool VerifyUserSession(UUID userID, UUID session); + bool VerifyUserSession(UUID principalID, UUID session); // Remove a user session identifier and deauthenticate the user // - void DestroyUserSession(UUID userID); + void DestroyUserSession(UUID principalID); } } -- cgit v1.1