aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r--OpenSim/Services/Interfaces/IAuthenticationService.cs36
-rw-r--r--OpenSim/Services/Interfaces/IUserService.cs35
2 files changed, 10 insertions, 61 deletions
diff --git a/OpenSim/Services/Interfaces/IAuthenticationService.cs b/OpenSim/Services/Interfaces/IAuthenticationService.cs
index b448a14..9225773 100644
--- a/OpenSim/Services/Interfaces/IAuthenticationService.cs
+++ b/OpenSim/Services/Interfaces/IAuthenticationService.cs
@@ -39,39 +39,12 @@ namespace OpenSim.Services.Interfaces
39 public interface IAuthenticationService 39 public interface IAuthenticationService
40 { 40 {
41 ////////////////////////////////////////////////////// 41 //////////////////////////////////////////////////////
42 // PKI Zone!
43 //
44 // HG2 authentication works by using a cryptographic
45 // exchange.
46 // This method must provide a public key, the other
47 // crypto methods must understand hoow to deal with
48 // messages encrypted to it.
49 //
50 // If the public key is of zero length, you will
51 // get NO encryption and NO security.
52 //
53 // For non-HG installations, this is not relevant
54 //
55 // Implementors who are not using PKI can treat the
56 // cyphertext as a string and provide a zero-length
57 // key. Encryptionless implementations will not
58 // interoperate with implementations using encryption.
59 // If one side uses encryption, both must do so.
60 //
61 byte[] GetPublicKey();
62
63 //////////////////////////////////////////////////////
64 // Authentication 42 // Authentication
65 // 43 //
66 // These methods will return a token, which can be used to access 44 // These methods will return a token, which can be used to access
67 // various services. 45 // various services.
68 // 46 //
69 // The encrypted versions take the received cyphertext and
70 // the public key of the peer, which the connector must have
71 // obtained using a remote GetPublicKey call.
72 //
73 string Authenticate(UUID principalID, string password, int lifetime); 47 string Authenticate(UUID principalID, string password, int lifetime);
74 byte[] AuthenticateEncrypted(byte[] cyphertext, byte[] key);
75 48
76 ////////////////////////////////////////////////////// 49 //////////////////////////////////////////////////////
77 // Verification 50 // Verification
@@ -81,12 +54,7 @@ namespace OpenSim.Services.Interfaces
81 // Tokens expire after 30 minutes and can be refreshed by 54 // Tokens expire after 30 minutes and can be refreshed by
82 // re-verifying. 55 // re-verifying.
83 // 56 //
84 // If encrypted authentication was used, encrypted verification
85 // must be used to refresh. Unencrypted verification is still
86 // performed, but doesn't refresh token lifetime.
87 //
88 bool Verify(UUID principalID, string token, int lifetime); 57 bool Verify(UUID principalID, string token, int lifetime);
89 bool VerifyEncrypted(byte[] cyphertext, byte[] key);
90 58
91 ////////////////////////////////////////////////////// 59 //////////////////////////////////////////////////////
92 // Teardown 60 // Teardown
@@ -95,11 +63,7 @@ namespace OpenSim.Services.Interfaces
95 // invalidates it and it can not subsequently be used 63 // invalidates it and it can not subsequently be used
96 // or refreshed. 64 // or refreshed.
97 // 65 //
98 // Tokens created by encrypted authentication must
99 // be returned by encrypted release calls;
100 //
101 bool Release(UUID principalID, string token); 66 bool Release(UUID principalID, string token);
102 bool ReleaseEncrypted(byte[] cyphertext, byte[] key);
103 67
104 ////////////////////////////////////////////////////// 68 //////////////////////////////////////////////////////
105 // Grid 69 // Grid
diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs
index 35254a1..92bd8ef 100644
--- a/OpenSim/Services/Interfaces/IUserService.cs
+++ b/OpenSim/Services/Interfaces/IUserService.cs
@@ -30,13 +30,13 @@ using OpenMetaverse;
30 30
31namespace OpenSim.Services.Interfaces 31namespace OpenSim.Services.Interfaces
32{ 32{
33 public class UserAccountData 33 public class UserAccount
34 { 34 {
35 public UserAccountData() 35 public UserAccount()
36 { 36 {
37 } 37 }
38 38
39 public UserAccountData(UUID userID, UUID homeRegionID, float homePositionX, 39 public UserAccount(UUID userID, UUID homeRegionID, float homePositionX,
40 float homePositionY, float homePositionZ, float homeLookAtX, 40 float homePositionY, float homePositionZ, float homeLookAtX,
41 float homeLookAtY, float homeLookAtZ) 41 float homeLookAtY, float homeLookAtZ)
42 { 42 {
@@ -78,41 +78,26 @@ namespace OpenSim.Services.Interfaces
78 78
79 }; 79 };
80 80
81 public class UserAccountDataMessage 81 public interface IUserAccountService
82 { 82 {
83 public UserAccountData Data; 83 UserAccount GetUserAccount(UUID scopeID, UUID userID);
84 84 UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName);
85 // Set to the region's ID and secret when updating home location
86 //
87 public UUID RegionID;
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;
94 };
95
96 public interface IUserAccountDataService
97 {
98 UserAccountData GetUserAccountData(UUID scopeID, UUID userID);
99 UserAccountData GetUserAccountData(UUID scopeID, string FirstName, string LastName);
100 // Returns the list of avatars that matches both the search 85 // Returns the list of avatars that matches both the search
101 // criterion and the scope ID passed 86 // criterion and the scope ID passed
102 // 87 //
103 List<UserAccountData> GetUserAccountData(UUID scopeID, string query); 88 List<UserAccount> GetUserAccount(UUID scopeID, string query);
104 89
105 90
106 // This will set only the home region portion of the data! 91 // This will set only the home region portion of the data!
107 // Can't be used to set god level, flags, type or change the name! 92 // Can't be used to set god level, flags, type or change the name!
108 // 93 //
109 bool SetHomePosition(UserAccountData data, UUID RegionID, UUID RegionSecret); 94 bool SetHomePosition(UserAccount data, UUID RegionID, UUID RegionSecret);
110 95
111 // Update all updatable fields 96 // Update all updatable fields
112 // 97 //
113 bool SetUserAccountData(UserAccountData data, UUID PrincipalID, UUID SessionID); 98 bool SetUserAccount(UserAccount data, UUID PrincipalID, string token);
114 99
115 // Creates a user data record 100 // Creates a user data record
116 bool CreateUserAccountData(UserAccountData data, UUID PrincipalID, UUID SessionID); 101 bool CreateUserAccount(UserAccount data, UUID PrincipalID, string token);
117 } 102 }
118} 103}