]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/radius/radius.h
Optional authorization.
[stg.git] / projects / stargazer / plugins / other / radius / radius.h
index 2573cf9ec5809e87b833b5ef75daf70dd88eef48..742923f0f4fa86840be797a04a16b55a5e3cbac2 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <string>
 #include <deque>
+#include <set>
 
 #include <pthread.h>
 #include <unistd.h>
@@ -59,12 +60,15 @@ public:
     bool IsRunning() { return m_running; }
 
     const std::string& GetStrError() const { return m_error; }
-    std::string GetVersion() const { return "RADIUS data access plugin v 1.0"; }
+    std::string GetVersion() const { return "RADIUS data access plugin v. 2.0"; }
     uint16_t GetStartPosition() const { return 30; }
     uint16_t GetStopPosition() const { return 30; }
 
     int SendMessage(const STG_MSG&, uint32_t) const { return 0; }
 
+    void authorize(const USER& user);
+    void unauthorize(const std::string& login, const std::string& reason);
+
 private:
     RADIUS(const RADIUS & rvalue);
     RADIUS & operator=(const RADIUS & rvalue);
@@ -96,6 +100,7 @@ private:
 
     int m_listenSocket;
     std::deque<STG::Conn*> m_conns;
+    std::set<std::string> m_logins;
 
     pthread_t m_thread;