diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Interfaces.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs (renamed from OpenSim/Grid/AssetInventoryServer/Extensions/AuthorizeAll.cs) | 38 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs (renamed from OpenSim/Grid/AssetInventoryServer/Extensions/NullAuthentication.cs) | 38 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml | 6 |
5 files changed, 74 insertions, 14 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs b/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs index 012c4ea..c6c7da2 100644 --- a/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs +++ b/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs | |||
@@ -122,6 +122,8 @@ namespace OpenSim.Grid.AssetInventoryServer | |||
122 | } | 122 | } |
123 | 123 | ||
124 | frontends.AddRange(LoadAssetInventoryServerPlugins("/OpenSim/AssetInventoryServer/Frontend", String.Empty)); | 124 | frontends.AddRange(LoadAssetInventoryServerPlugins("/OpenSim/AssetInventoryServer/Frontend", String.Empty)); |
125 | AuthenticationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthenticationProvider", String.Empty) as IAuthenticationProvider; | ||
126 | AuthorizationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthorizationProvider", String.Empty) as IAuthorizationProvider; | ||
125 | 127 | ||
126 | return true; | 128 | return true; |
127 | } | 129 | } |
diff --git a/OpenSim/Grid/AssetInventoryServer/Interfaces.cs b/OpenSim/Grid/AssetInventoryServer/Interfaces.cs index c4aa7ac..19298c5 100644 --- a/OpenSim/Grid/AssetInventoryServer/Interfaces.cs +++ b/OpenSim/Grid/AssetInventoryServer/Interfaces.cs | |||
@@ -102,14 +102,14 @@ namespace OpenSim.Grid.AssetInventoryServer | |||
102 | BackendResponse TryPurgeFolder(Uri owner, UUID folderID); | 102 | BackendResponse TryPurgeFolder(Uri owner, UUID folderID); |
103 | } | 103 | } |
104 | 104 | ||
105 | public interface IAuthenticationProvider | 105 | public interface IAuthenticationProvider : IAssetInventoryServerPlugin |
106 | { | 106 | { |
107 | void AddIdentifier(UUID authToken, Uri identifier); | 107 | void AddIdentifier(UUID authToken, Uri identifier); |
108 | bool RemoveIdentifier(UUID authToken); | 108 | bool RemoveIdentifier(UUID authToken); |
109 | bool TryGetIdentifier(UUID authToken, out Uri identifier); | 109 | bool TryGetIdentifier(UUID authToken, out Uri identifier); |
110 | } | 110 | } |
111 | 111 | ||
112 | public interface IAuthorizationProvider | 112 | public interface IAuthorizationProvider : IAssetInventoryServerPlugin |
113 | { | 113 | { |
114 | bool IsMetadataAuthorized(UUID authToken, UUID assetID); | 114 | bool IsMetadataAuthorized(UUID authToken, UUID assetID); |
115 | /// <summary> | 115 | /// <summary> |
diff --git a/OpenSim/Grid/AssetInventoryServer/Extensions/AuthorizeAll.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs index 10f3bdc..8974b6f 100644 --- a/OpenSim/Grid/AssetInventoryServer/Extensions/AuthorizeAll.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs | |||
@@ -28,28 +28,54 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | using System; | 30 | using System; |
31 | using ExtensionLoader; | ||
32 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | ||
33 | 33 | ||
34 | namespace OpenSim.Grid.AssetInventoryServer.Extensions | 34 | namespace OpenSim.Grid.AssetInventoryServer.Plugins |
35 | { | 35 | { |
36 | public class AuthorizeAll : IExtension<AssetInventoryServer>, IAuthorizationProvider | 36 | public class AuthorizeAllPlugin : IAuthorizationProvider |
37 | { | 37 | { |
38 | AssetInventoryServer server; | 38 | AssetInventoryServer server; |
39 | 39 | ||
40 | public AuthorizeAll() | 40 | public AuthorizeAllPlugin() |
41 | { | 41 | { |
42 | } | 42 | } |
43 | 43 | ||
44 | public void Start(AssetInventoryServer server) | 44 | #region IPlugin implementation |
45 | |||
46 | public void Initialise(AssetInventoryServer server) | ||
45 | { | 47 | { |
46 | this.server = server; | 48 | this.server = server; |
49 | |||
50 | Logger.Log.Info("[ASSET] Authorize All loaded."); | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// <para>Initialises asset interface</para> | ||
55 | /// </summary> | ||
56 | public void Initialise() | ||
57 | { | ||
58 | Logger.Log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); | ||
59 | throw new PluginNotInitialisedException(Name); | ||
60 | } | ||
61 | |||
62 | public void Dispose() | ||
63 | { | ||
64 | } | ||
65 | |||
66 | public string Version | ||
67 | { | ||
68 | // TODO: this should be something meaningful and not hardcoded? | ||
69 | get { return "0.1"; } | ||
47 | } | 70 | } |
48 | 71 | ||
49 | public void Stop() | 72 | public string Name |
50 | { | 73 | { |
74 | get { return "AssetInventoryServer Null authentication frontend"; } | ||
51 | } | 75 | } |
52 | 76 | ||
77 | #endregion IPlugin implementation | ||
78 | |||
53 | public bool IsMetadataAuthorized(UUID authToken, UUID assetID) | 79 | public bool IsMetadataAuthorized(UUID authToken, UUID assetID) |
54 | { | 80 | { |
55 | return true; | 81 | return true; |
diff --git a/OpenSim/Grid/AssetInventoryServer/Extensions/NullAuthentication.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs index 96e210a..81e58c6 100644 --- a/OpenSim/Grid/AssetInventoryServer/Extensions/NullAuthentication.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs | |||
@@ -28,28 +28,54 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | using System; | 30 | using System; |
31 | using ExtensionLoader; | ||
32 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | ||
33 | 33 | ||
34 | namespace OpenSim.Grid.AssetInventoryServer.Extensions | 34 | namespace OpenSim.Grid.AssetInventoryServer.Plugins |
35 | { | 35 | { |
36 | public class NullAuthentication : IExtension<AssetInventoryServer>, IAuthenticationProvider | 36 | public class NullAuthenticationPlugin : IAuthenticationProvider |
37 | { | 37 | { |
38 | AssetInventoryServer server; | 38 | AssetInventoryServer server; |
39 | 39 | ||
40 | public NullAuthentication() | 40 | public NullAuthenticationPlugin() |
41 | { | 41 | { |
42 | } | 42 | } |
43 | 43 | ||
44 | public void Start(AssetInventoryServer server) | 44 | #region IPlugin implementation |
45 | |||
46 | public void Initialise(AssetInventoryServer server) | ||
45 | { | 47 | { |
46 | this.server = server; | 48 | this.server = server; |
49 | |||
50 | Logger.Log.Info("[ASSET] Null Authentication loaded."); | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// <para>Initialises asset interface</para> | ||
55 | /// </summary> | ||
56 | public void Initialise() | ||
57 | { | ||
58 | Logger.Log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); | ||
59 | throw new PluginNotInitialisedException(Name); | ||
60 | } | ||
61 | |||
62 | public void Dispose() | ||
63 | { | ||
64 | } | ||
65 | |||
66 | public string Version | ||
67 | { | ||
68 | // TODO: this should be something meaningful and not hardcoded? | ||
69 | get { return "0.1"; } | ||
47 | } | 70 | } |
48 | 71 | ||
49 | public void Stop() | 72 | public string Name |
50 | { | 73 | { |
74 | get { return "AssetInventoryServer Null authentication frontend"; } | ||
51 | } | 75 | } |
52 | 76 | ||
77 | #endregion IPlugin implementation | ||
78 | |||
53 | public void AddIdentifier(UUID authToken, Uri identifier) | 79 | public void AddIdentifier(UUID authToken, Uri identifier) |
54 | { | 80 | { |
55 | } | 81 | } |
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml b/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml index 0ec28de..67c4cd2 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Resources/AssetInventoryServerPlugins.addin.xml | |||
@@ -16,4 +16,10 @@ | |||
16 | <Extension path="/OpenSim/AssetInventoryServer/Frontend"> | 16 | <Extension path="/OpenSim/AssetInventoryServer/Frontend"> |
17 | <Plugin id="ReferenceFrontend" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.ReferenceFrontendPlugin" /> | 17 | <Plugin id="ReferenceFrontend" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.ReferenceFrontendPlugin" /> |
18 | </Extension> | 18 | </Extension> |
19 | <Extension path="/OpenSim/AssetInventoryServer/AuthenticationProvider"> | ||
20 | <Plugin id="NullAuthentication" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.NullAuthenticationPlugin" /> | ||
21 | </Extension> | ||
22 | <Extension path="/OpenSim/AssetInventoryServer/AuthorizationProvider"> | ||
23 | <Plugin id="AuthorizeAll" provider="OpenSim.Grid.AssetInventoryServer.Plugins.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.AuthorizeAllPlugin" /> | ||
24 | </Extension> | ||
19 | </Addin> | 25 | </Addin> |