aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r--OpenSim/Services/Interfaces/IAuthenticationService.cs42
-rw-r--r--OpenSim/Services/Interfaces/IUserService.cs45
2 files changed, 74 insertions, 13 deletions
diff --git a/OpenSim/Services/Interfaces/IAuthenticationService.cs b/OpenSim/Services/Interfaces/IAuthenticationService.cs
index fa45cbc..2402414 100644
--- a/OpenSim/Services/Interfaces/IAuthenticationService.cs
+++ b/OpenSim/Services/Interfaces/IAuthenticationService.cs
@@ -38,9 +38,9 @@ namespace OpenSim.Services.Interfaces
38 // 38 //
39 public interface IAuthenticationService 39 public interface IAuthenticationService
40 { 40 {
41 // Check the pricipal's password 41 //////////////////////////////////////////////////
42 // Web login key portion
42 // 43 //
43 bool Authenticate(UUID principalID, string password);
44 44
45 // Get a service key given that principal's 45 // Get a service key given that principal's
46 // authentication token (master key). 46 // authentication token (master key).
@@ -51,18 +51,44 @@ namespace OpenSim.Services.Interfaces
51 // 51 //
52 bool VerifyKey(UUID principalID, string key); 52 bool VerifyKey(UUID principalID, string key);
53 53
54 // Create a new user session. If one exists, it is cleared 54 //////////////////////////////////////////////////
55 // 55 // Password auth portion
56 UUID AllocateUserSession(UUID userID); 56 //
57
58 // Here's how thos works, and why.
59 //
60 // The authentication methods will return the existing session,
61 // or UUID.Zero if authentication failed. If there is no session,
62 // they will create one.
63 // The CreateUserSession method will unconditionally create a session
64 // and invalidate the prior session.
65 // Grid login uses this method to make sure that the session is
66 // fresh and new. Other software, like management applications,
67 // can obtain this existing session if they have a key or password
68 // for that account, this allows external apps to obtain credentials
69 // and use authenticating interface methods.
70 //
71
72 // Check the pricipal's password
73 //
74 UUID AuthenticatePassword(UUID principalID, string password);
75
76 // Check the principal's key
77 //
78 UUID AuthenticateKey(UUID principalID, string password);
79
80 // Create a new session, invalidating the old ones
81 //
82 UUID CreateUserSession(UUID principalID, UUID oldSessionID);
57 83
58 // Verify that a user session ID is valid. A session ID is 84 // Verify that a user session ID is valid. A session ID is
59 // considered valid when a user has successfully authenticated 85 // considered valid when a user has successfully authenticated
60 // at least one time inside that session. 86 // at least one time inside that session.
61 // 87 //
62 bool VerifyUserSession(UUID principalID, UUID session); 88 bool VerifyUserSession(UUID principalID, UUID sessionID);
63 89
64 // Remove a user session identifier and deauthenticate the user 90 // Deauthenticate user
65 // 91 //
66 void DestroyUserSession(UUID principalID); 92 bool DestroyUserSession(UUID principalID, UUID sessionID);
67 } 93 }
68} 94}
diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs
index 2a4e79d..9bbe503 100644
--- a/OpenSim/Services/Interfaces/IUserService.cs
+++ b/OpenSim/Services/Interfaces/IUserService.cs
@@ -32,6 +32,24 @@ namespace OpenSim.Services.Interfaces
32{ 32{
33 public class UserData 33 public class UserData
34 { 34 {
35 public UserData()
36 {
37 }
38
39 public UserData(UUID userID, UUID homeRegionID, float homePositionX,
40 float homePositionY, float homePositionZ, float homeLookAtX,
41 float homeLookAtY, float homeLookAtZ)
42 {
43 UserID = userID;
44 HomeRegionID = homeRegionID;
45 HomePositionX = homePositionX;
46 HomePositionY = homePositionY;
47 HomePositionZ = homePositionZ;
48 HomeLookAtX = homeLookAtX;
49 HomeLookAtY = homeLookAtY;
50 HomeLookAtZ = homeLookAtZ;
51 }
52
35 public string FirstName; 53 public string FirstName;
36 public string LastName; 54 public string LastName;
37 public UUID UserID; 55 public UUID UserID;
@@ -49,7 +67,7 @@ namespace OpenSim.Services.Interfaces
49 public float HomeLookAtY; 67 public float HomeLookAtY;
50 public float HomeLookAtZ; 68 public float HomeLookAtZ;
51 69
52 // There are here because they 70 // These are here because they
53 // concern the account rather than 71 // concern the account rather than
54 // the profile. They just happen to 72 // the profile. They just happen to
55 // be used in the Linden profile as well 73 // be used in the Linden profile as well
@@ -58,11 +76,21 @@ namespace OpenSim.Services.Interfaces
58 public int UserFlags; 76 public int UserFlags;
59 public string AccountType; 77 public string AccountType;
60 78
61 // This is only used internally. It needs to be set 79 };
62 // to the secret of the sending region when updating 80
63 // user data. 81 public class UserDataMessage
82 {
83 public UserData Data;
84
85 // Set to the region's ID and secret when updating home location
64 // 86 //
87 public UUID RegionID;
65 public UUID RegionSecret; 88 public UUID RegionSecret;
89
90 // Set to the auth info of the user requesting creation/update
91 //
92 public UUID PrincipalID;
93 public UUID SessionID;
66 }; 94 };
67 95
68 public interface IUserDataService 96 public interface IUserDataService
@@ -73,11 +101,18 @@ namespace OpenSim.Services.Interfaces
73 // This will set only the home region portion of the data! 101 // This will set only the home region portion of the data!
74 // Can't be used to set god level, flags, type or change the name! 102 // Can't be used to set god level, flags, type or change the name!
75 // 103 //
76 bool SetUserData(UserData data); 104 bool SetHomePosition(UserData data, UUID RegionID, UUID RegionSecret);
105
106 // Update all updatable fields
107 //
108 bool SetUserData(UserData data, UUID PrincipalID, UUID SessionID);
77 109
78 // Returns the list of avatars that matches both the search 110 // Returns the list of avatars that matches both the search
79 // criterion and the scope ID passed 111 // criterion and the scope ID passed
80 // 112 //
81 List<UserData> GetAvatarPickerData(UUID scopeID, string query); 113 List<UserData> GetAvatarPickerData(UUID scopeID, string query);
114
115 // Creates a user data record
116 bool CreateUserData(UserData data, UUID PrincipalID, UUID SessionID);
82 } 117 }
83} 118}