Leosac
0.8.0
Open Source Access Control
IAccessProfile.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2014-2016 Leosac
3
4
This file is part of Leosac.
5
6
Leosac is free software: you can redistribute it and/or modify
7
it under the terms of the GNU Affero General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
Leosac is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU Affero General Public License for more details.
15
16
You should have received a copy of the GNU Affero General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include "
core/auth/AuthTarget.hpp
"
23
#include <chrono>
24
#include <memory>
25
26
namespace
Leosac
27
{
28
namespace
Auth
29
{
30
class
IAccessProfile;
31
using
IAccessProfilePtr
= std::shared_ptr<IAccessProfile>;
32
36
class
IAccessProfile
37
{
38
public
:
47
virtual
bool
isAccessGranted
(
const
std::chrono::system_clock::time_point &date,
48
AuthTargetPtr
target) = 0;
49
50
virtual
size_t
schedule_count
()
const
= 0;
51
};
52
}
53
}
AuthTarget.hpp
Leosac::Auth::IAccessProfile::isAccessGranted
virtual bool isAccessGranted(const std::chrono::system_clock::time_point &date, AuthTargetPtr target)=0
Does the profile allow access to the user.
Leosac::Auth::IAccessProfilePtr
std::shared_ptr< IAccessProfile > IAccessProfilePtr
Definition:
AuthFwd.hpp:88
Leosac::Auth::AuthTargetPtr
std::shared_ptr< AuthTarget > AuthTargetPtr
Definition:
AuthFwd.hpp:93
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition:
APIStatusCode.hpp:22
Leosac::Auth::IAccessProfile::schedule_count
virtual size_t schedule_count() const =0
Leosac::Auth::IAccessProfile
Holds information about access permission.
Definition:
IAccessProfile.hpp:36
src
core
auth
Interfaces
IAccessProfile.hpp
Generated on Tue Mar 22 2022 10:48:18 for Leosac by
1.8.17