Leosac
0.8.0
Open Source Access Control
PinCode.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/credentials/Credential.hpp
"
23
#include "
core/credentials/IPinCode.hpp
"
24
25
namespace
Leosac
26
{
27
namespace
Cred
28
{
32
#pragma db object polymorphic optimistic
33
class
PinCode
:
public
virtual
IPinCode
,
public
Credential
34
{
35
public
:
36
MAKE_VISITABLE_FALLBACK
(
IPinCode
);
37
PinCode
() =
default
;
38
39
const
std::string &
pin_code
()
const override
;
40
41
void
pin_code
(
const
std::string &
string
)
override
;
42
43
protected
:
44
std::string
pin_code_
;
45
46
friend
class
odb::access
;
47
};
48
49
class
PinCodeValidator
50
{
51
public
:
52
static
void
validate
(
const
IPinCode
&card);
53
static
void
validate_pin_code
(
const
std::string &);
54
};
55
}
56
}
Leosac::Cred::PinCode
A PinCode credential.
Definition:
PinCode.hpp:33
Leosac::Cred::PinCodeValidator::validate
static void validate(const IPinCode &card)
Definition:
PinCode.cpp:39
Leosac::Cred::PinCode::access
friend class odb::access
Definition:
PinCode.hpp:46
Leosac::Cred::PinCode::PinCode
PinCode()=default
Leosac::Cred::PinCodeValidator::validate_pin_code
static void validate_pin_code(const std::string &)
Definition:
PinCode.cpp:44
Leosac::Cred::PinCode::MAKE_VISITABLE_FALLBACK
MAKE_VISITABLE_FALLBACK(IPinCode)
Credential.hpp
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition:
APIStatusCode.hpp:22
Leosac::Cred::PinCode::pin_code
const std::string & pin_code() const override
Definition:
PinCode.cpp:28
Leosac::Cred::PinCode::pin_code_
std::string pin_code_
Definition:
PinCode.hpp:44
Leosac::Cred::Credential
An ODB enabled credential object.
Definition:
Credential.hpp:37
Leosac::Cred::PinCodeValidator
Definition:
PinCode.hpp:49
Leosac::Cred::IPinCode
Interface for PinCode credentials.
Definition:
IPinCode.hpp:32
IPinCode.hpp
src
core
credentials
PinCode.hpp
Generated on Tue Mar 22 2022 10:48:20 for Leosac by
1.8.17