Leosac  0.8.0
Open Source Access Control
Leosac::Auth Namespace Reference

Holds classes relevant to the Authentication and Authorization subsystem. More...


class  AccessPoint
struct  AccessPointBackend
 An AccessPointBackend object is used for module to provide implementation for access point CRUD operations. More...
class  AccessPointService
 This service lets various AccessPoint backend register and provide implementation to use by the AccessPointCRUD object. More...
class  AccessPointUpdate
class  AuthSourceBuilder
 This class is some kind of factory to create IAuthenticationSource object from a zmqpp::message sent by a AuthSource module (eg Wiegand). More...
class  AuthTarget
 Represent an object that we are authorizing against (a door). More...
class  BaseAuthSource
class  Door
 Represent a door. More...
class  Group
 A authentication group regroup users that share permissions. More...
class  GroupValidator
 Validate a Group object's attributes, throwing ModelException if some attributes are invalid. More...
class  IAccessPoint
 An interface for access point. More...
class  IAccessProfile
 Holds information about access permission. More...
class  IAuthenticationSource
 An Auth source is a card id, a pin code, a fingerprint, etc... More...
class  IAuthSourceMapper
 Base class to perform abstracted mapping operation over various AuthSource object. More...
class  IDoor
 A door. More...
class  IZone
 The interface for zones. More...
class  ProfileMerger
 Helper class that merges profile together. More...
class  SimpleAccessProfile
 Concrete implementation of a simple access control class. More...
class  Token
 An authentication token used for authenticating a user against Leosac. More...
class  User
 Represent a user. More...
class  UserGroupMembership
 Describe the membership of an User with regroup to a Group. More...
struct  UserGroupMembershipComparator
 Compares 2 UserGroupMembership object. More...
class  ValidityInfo
 A simple class that stores (and can be queried for) the validity of some objects. More...
class  Zone
 A Zone is a container for doors and other zone. More...
class  ZoneValidator


using UserPtr = std::shared_ptr< User >
using UserLPtr = odb::lazy_shared_ptr< User >
using UserLWPtr = odb::lazy_weak_ptr< User >
using UserId = unsigned long
using GroupPtr = std::shared_ptr< Group >
using GroupWPtr = std::weak_ptr< Group >
using GroupLWPtr = odb::lazy_weak_ptr< Group >
using GroupLPtr = odb::lazy_shared_ptr< Group >
using GroupId = unsigned long
using SimpleAccessProfilePtr = std::shared_ptr< SimpleAccessProfile >
using UserGroupMembershipPtr = std::shared_ptr< UserGroupMembership >
using UserGroupMembershipId = unsigned long
using TokenPtr = std::shared_ptr< Token >
using IAccessProfilePtr = std::shared_ptr< IAccessProfile >
using AuthTargetPtr = std::shared_ptr< AuthTarget >
using IAuthenticationSourcePtr = std::shared_ptr< IAuthenticationSource >
using BaseAuthSourcePtr = std::shared_ptr< BaseAuthSource >
using IDoorPtr = std::shared_ptr< IDoor >
using IDoorLPtr = odb::lazy_shared_ptr< IDoor >
using IDoorLWPtr = odb::lazy_weak_ptr< IDoor >
using DoorId = unsigned long
using DoorLWPtr = odb::lazy_weak_ptr< Door >
using DoorLPtr = odb::lazy_shared_ptr< Door >
using DoorPtr = std::shared_ptr< Door >
using IZonePtr = std::shared_ptr< IZone >
using IZoneLPtr = odb::lazy_shared_ptr< IZone >
using IZoneLWPtr = odb::lazy_weak_ptr< IZone >
using ZoneId = unsigned long
using ZoneLWPtr = odb::lazy_weak_ptr< Zone >
using ZoneLPtr = odb::lazy_shared_ptr< Zone >
using ZonePtr = std::shared_ptr< Zone >
using IAccessPointPtr = std::shared_ptr< IAccessPoint >
using AccessPointId = unsigned long
using AccessPointLWPtr = odb::lazy_weak_ptr< AccessPoint >
using AccessPointLPtr = odb::lazy_shared_ptr< AccessPoint >
using AccessPointPtr = std::shared_ptr< AccessPoint >
using AccessPointUpdatePtr = std::shared_ptr< AccessPointUpdate >
using AccessPointUpdateLPtr = odb::lazy_shared_ptr< AccessPointUpdate >
using UserGroupMembershipSet = std::set< UserGroupMembershipPtr, UserGroupMembershipComparator >


enum  SourceType : uint8_t { SourceType::SIMPLE_WIEGAND = 1, SourceType::WIEGAND_PIN = 2, SourceType::WIEGAND_CARD_PIN = 3, SourceType::SIMPLE_CSN = 4 }
enum  AccessStatus : uint8_t { AccessStatus::GRANTED = 1, AccessStatus::DENIED = 2 }
enum  GroupRank { GroupRank::MEMBER = 0, GroupRank::OPERATOR = 1, GroupRank::ADMIN = 2 }
 The rank of an User inside a Group. More...
enum  UserRank {
  UserRank::USER = 0, UserRank::VIEWER = 1, UserRank::MANAGER = 2, UserRank::SUPERVISOR = 3,
  UserRank::ADMIN = 4

Detailed Description

Holds classes relevant to the Authentication and Authorization subsystem.

This namespace defines interface and concrete implementation of some class useful in the authentication and authorization system. Authentication module will likely make direct use of this part of Leosac.

See also
Authentication Documentation

Typedef Documentation

◆ AccessPointId

using Leosac::Auth::AccessPointId = typedef unsigned long

Definition at line 128 of file AuthFwd.hpp.

◆ AccessPointLPtr

using Leosac::Auth::AccessPointLPtr = typedef odb::lazy_shared_ptr<AccessPoint>

Definition at line 132 of file AuthFwd.hpp.

◆ AccessPointLWPtr

using Leosac::Auth::AccessPointLWPtr = typedef odb::lazy_weak_ptr<AccessPoint>

Definition at line 131 of file AuthFwd.hpp.

◆ AccessPointPtr

using Leosac::Auth::AccessPointPtr = typedef std::shared_ptr<AccessPoint>

Definition at line 133 of file AuthFwd.hpp.

◆ AccessPointUpdateLPtr

using Leosac::Auth::AccessPointUpdateLPtr = typedef odb::lazy_shared_ptr<AccessPointUpdate>

Definition at line 137 of file AuthFwd.hpp.

◆ AccessPointUpdatePtr

using Leosac::Auth::AccessPointUpdatePtr = typedef std::shared_ptr<AccessPointUpdate>

Definition at line 136 of file AuthFwd.hpp.

◆ AuthTargetPtr

typedef std::shared_ptr< AuthTarget > Leosac::Auth::AuthTargetPtr

Definition at line 93 of file AuthFwd.hpp.

◆ BaseAuthSourcePtr

typedef std::shared_ptr< BaseAuthSource > Leosac::Auth::BaseAuthSourcePtr

Definition at line 99 of file AuthFwd.hpp.

◆ DoorId

using Leosac::Auth::DoorId = typedef unsigned long

Definition at line 107 of file AuthFwd.hpp.

◆ DoorLPtr

using Leosac::Auth::DoorLPtr = typedef odb::lazy_shared_ptr<Door>

Definition at line 111 of file AuthFwd.hpp.

◆ DoorLWPtr

using Leosac::Auth::DoorLWPtr = typedef odb::lazy_weak_ptr<Door>

Definition at line 110 of file AuthFwd.hpp.

◆ DoorPtr

using Leosac::Auth::DoorPtr = typedef std::shared_ptr<Door>

Definition at line 112 of file AuthFwd.hpp.

◆ GroupId

using Leosac::Auth::GroupId = typedef unsigned long

Definition at line 41 of file AuthFwd.hpp.

◆ GroupLPtr

using Leosac::Auth::GroupLPtr = typedef odb::lazy_shared_ptr<Group>

Definition at line 40 of file AuthFwd.hpp.

◆ GroupLWPtr

using Leosac::Auth::GroupLWPtr = typedef odb::lazy_weak_ptr<Group>

Definition at line 39 of file AuthFwd.hpp.

◆ GroupPtr

using Leosac::Auth::GroupPtr = typedef std::shared_ptr<Group>

Definition at line 37 of file AuthFwd.hpp.

◆ GroupWPtr

using Leosac::Auth::GroupWPtr = typedef std::weak_ptr<Group>

Definition at line 38 of file AuthFwd.hpp.

◆ IAccessPointPtr

using Leosac::Auth::IAccessPointPtr = typedef std::shared_ptr<IAccessPoint>

Definition at line 127 of file AuthFwd.hpp.

◆ IAccessProfilePtr

typedef std::shared_ptr< IAccessProfile > Leosac::Auth::IAccessProfilePtr

Definition at line 88 of file AuthFwd.hpp.

◆ IAuthenticationSourcePtr

Definition at line 96 of file AuthFwd.hpp.

◆ IDoorLPtr

using Leosac::Auth::IDoorLPtr = typedef odb::lazy_shared_ptr<IDoor>

Definition at line 105 of file AuthFwd.hpp.

◆ IDoorLWPtr

using Leosac::Auth::IDoorLWPtr = typedef odb::lazy_weak_ptr<IDoor>

Definition at line 106 of file AuthFwd.hpp.

◆ IDoorPtr

using Leosac::Auth::IDoorPtr = typedef std::shared_ptr<IDoor>

Definition at line 104 of file AuthFwd.hpp.

◆ IZoneLPtr

using Leosac::Auth::IZoneLPtr = typedef odb::lazy_shared_ptr<IZone>

Definition at line 117 of file AuthFwd.hpp.

◆ IZoneLWPtr

using Leosac::Auth::IZoneLWPtr = typedef odb::lazy_weak_ptr<IZone>

Definition at line 118 of file AuthFwd.hpp.

◆ IZonePtr

using Leosac::Auth::IZonePtr = typedef std::shared_ptr<IZone>

Definition at line 116 of file AuthFwd.hpp.

◆ SimpleAccessProfilePtr

Definition at line 44 of file AuthFwd.hpp.

◆ TokenPtr

using Leosac::Auth::TokenPtr = typedef std::shared_ptr<Token>

Definition at line 85 of file AuthFwd.hpp.

◆ UserGroupMembershipId

using Leosac::Auth::UserGroupMembershipId = typedef unsigned long

Definition at line 82 of file AuthFwd.hpp.

◆ UserGroupMembershipPtr

Definition at line 81 of file AuthFwd.hpp.

◆ UserGroupMembershipSet

◆ UserId

using Leosac::Auth::UserId = typedef unsigned long

Definition at line 34 of file AuthFwd.hpp.

◆ UserLPtr

using Leosac::Auth::UserLPtr = typedef odb::lazy_shared_ptr<User>

Definition at line 32 of file AuthFwd.hpp.

◆ UserLWPtr

using Leosac::Auth::UserLWPtr = typedef odb::lazy_weak_ptr<User>

Definition at line 33 of file AuthFwd.hpp.

◆ UserPtr

using Leosac::Auth::UserPtr = typedef std::shared_ptr<User>

Definition at line 31 of file AuthFwd.hpp.

◆ ZoneId

using Leosac::Auth::ZoneId = typedef unsigned long

Definition at line 119 of file AuthFwd.hpp.

◆ ZoneLPtr

using Leosac::Auth::ZoneLPtr = typedef odb::lazy_shared_ptr<Zone>

Definition at line 123 of file AuthFwd.hpp.

◆ ZoneLWPtr

using Leosac::Auth::ZoneLWPtr = typedef odb::lazy_weak_ptr<Zone>

Definition at line 122 of file AuthFwd.hpp.

◆ ZonePtr

using Leosac::Auth::ZonePtr = typedef std::shared_ptr<Zone>

Definition at line 124 of file AuthFwd.hpp.

Enumeration Type Documentation

◆ AccessStatus

enum Leosac::Auth::AccessStatus : uint8_t

Definition at line 54 of file Auth.hpp.

◆ GroupRank

The rank of an User inside a Group.


Definition at line 49 of file AuthFwd.hpp.

◆ SourceType

enum Leosac::Auth::SourceType : uint8_t

This define message formatting for data source SIMPLE_WIEGAND.

You can find out more here.


Message formatting when using a simple PIN code.


When reading both a card an a PIN code.


A simple Card Serial Number.

It is represented as an hexadecimal string.

Definition at line 29 of file Auth.hpp.

◆ UserRank


A default user.


Has viewing permission.


Can access user management aswel as credential management.


Full access except changing user role.


Site administrator.

Definition at line 56 of file AuthFwd.hpp.