Version: 0.6.0
auth.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Server)
3  * Purpose: wxGISAuthService class. Auth main service class.
4  * It adds plug-ins of different types of authenticate (file, LDAP, OS etc.)
5  * Author: Bishop (aka Barishnikov Dmitriy), polimax@mail.ru
6  ******************************************************************************
7 * Copyright (C) 2008-2010 Bishop
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  ****************************************************************************/
22 #pragma once
23 /*
24 #include "wxgissrv/srv_framework/framework.h"
25 #include "wxgis/networking/message.h"
26 /*
30 class IServerAuthPlugin
31 {
32 public:
33  virtual ~IServerAuthPlugin(void){};
34  virtual AUTHRESPOND GetAuth(wxString sLogin, wxString sCryptPass) = 0;
35  virtual bool Init(wxXmlNode* pConfig) = 0;
36 };
37 /*
41 class WXDLLIMPEXP_GIS_FRW wxGISAuthService :
42  public IService,
43  public INetMessageReceiver
44 {
45 public:
46  wxGISAuthService(void);
47  virtual ~wxGISAuthService(void);
48  //IService
49  virtual bool Start(IServerApplication* pApp, wxXmlNode* pConfig);
50  virtual bool Stop(void);
51  //INetMessageReceiver
52  virtual void ProcessMessage(WXGISMSG msg, wxXmlNode* pChildNode);
53 protected:
54  wxXmlNode* m_pConfig;
55  IServerApplication* m_pApp;
56  std::map<short, IServerAuthPlugin*> m_AuthPluginMap;// priority | plugin
57 };
58 */