* Author : Maxim Mamontov <faust@stargazer.dp.ua>
*/
-#ifndef __STG_RADIUS_CONFIG_H__
-#define __STG_RADIUS_CONFIG_H__
+#pragma once
#include "stg/module_settings.h"
#include <unistd.h> // uid_t, gid_t
#include <sys/stat.h> // mode_t
-class USER;
-
namespace STG
{
+struct User;
+
struct Config
{
typedef std::map<std::string, std::string> Pairs;
Authorize() : m_auth(false) {}
Authorize(const Pairs& cond) : m_auth(true), m_cond(cond) {}
- bool check(const USER& user, const Pairs& radiusData) const;
+ bool check(const User& user, const Pairs& radiusData) const;
bool exists() const { return m_auth; }
private:
bool m_auth;
struct Section
{
- Section() {}
+ Section() = default;
Section(const Pairs& ma, const Pairs& mo, const Pairs& re, ReturnCode code, const Authorize& auth)
: match(ma), modify(mo), reply(re), returnCode(code), authorize(auth) {}
Pairs match;
Authorize authorize;
};
- Config() {}
- Config(const MODULE_SETTINGS& settings);
+ Config() = default;
+ Config(const ModuleSettings& settings);
Section autz;
Section auth;
};
} // namespace STG
-
-#endif