From 67f803c919324f49e21279faa43c9578b625529e Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 4 Sep 2009 08:10:05 +0100 Subject: Add the new AuthStore to migrations. Update OpenSim.Server.ini --- OpenSim/Data/MySQL/MySQLAuthenticationData.cs | 3 +++ OpenSim/Data/MySQL/Resources/001_AuthStore.sql | 21 +++++++++++++++++++++ .../AuthenticationServiceBase.cs | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 OpenSim/Data/MySQL/Resources/001_AuthStore.sql (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs index 1ee64ce..afd59bd 100644 --- a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs +++ b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs @@ -45,6 +45,9 @@ namespace OpenSim.Data.MySQL : base(connectionString) { m_Realm = realm; + + Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore"); + m.Update(); } public AuthenticationData Get(UUID principalID) diff --git a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql b/OpenSim/Data/MySQL/Resources/001_AuthStore.sql new file mode 100644 index 0000000..c7e16fb --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/001_AuthStore.sql @@ -0,0 +1,21 @@ +begin; + +CREATE TABLE `auth` ( + `UUID` char(36) NOT NULL, + `passwordHash` char(32) NOT NULL default '', + `passwordSalt` char(32) NOT NULL default '', + `webLoginKey` varchar(255) NOT NULL default '', + PRIMARY KEY (`UUID`) +) ENGINE=InnoDB; + +CREATE TABLE `tokens` ( + `UUID` char(36) NOT NULL, + `token` varchar(255) NOT NULL, + `validity` datetime NOT NULL, + UNIQUE KEY `uuid_token` (`UUID`,`token`), + KEY `UUID` (`UUID`), + KEY `token` (`token`), + KEY `validity` (`validity`) +) ENGINE=InnoDB; + +commit; diff --git a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs index 5056db3..2ed177c 100644 --- a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs +++ b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs @@ -53,7 +53,7 @@ namespace OpenSim.Services.AuthenticationService { string dllName = String.Empty; string connString = String.Empty; - string realm = String.Empty; + string realm = "auth"; // // Try reading the [AuthenticationService] section first, if it exists -- cgit v1.1