28 lines
467 B
C++
28 lines
467 B
C++
#pragma once
|
|
|
|
namespace rublon {
|
|
|
|
enum class PamAction { accept, decline };
|
|
|
|
enum Authen {};
|
|
|
|
class AuthenticationStatus {
|
|
public:
|
|
enum class Action { Denied, Confirmed, Bypass };
|
|
|
|
AuthenticationStatus(Action action) : _action{action} {}
|
|
|
|
constexpr bool userAuthorized() const {
|
|
return _action == Action::Confirmed;
|
|
}
|
|
|
|
constexpr bool bypass() const {
|
|
return false;
|
|
}
|
|
|
|
private:
|
|
Action _action;
|
|
};
|
|
|
|
} // namespace rublon
|