Leosac  0.8.0
Open Source Access Control
Leosac::Auth::IAuthenticationSource Class Referenceabstract

An Auth source is a card id, a pin code, a fingerprint, etc... More...

#include <IAuthenticationSource.hpp>

+ Inheritance diagram for Leosac::Auth::IAuthenticationSource:
+ Collaboration diagram for Leosac::Auth::IAuthenticationSource:

Public Member Functions

virtual ~IAuthenticationSource ()=default
 
virtual void addAuthSource (IAuthenticationSourcePtr source)=0
 Adds a new authentication sources as a subsource of this one. More...
 
virtual void owner (UserPtr user)=0
 Set the user that map to this source,. More...
 
virtual UserPtr owner () const =0
 Retrieve the user that map to this source. More...
 
virtual IAccessProfilePtr profile () const =0
 Return (or generate) an Access Profile that make sense based on the data available in this AuthenticationSource object. More...
 
virtual void profile (IAccessProfilePtr p)=0
 Set an access profile for this credentials. More...
 
virtual const std::string & name () const =0
 Return the name of the source. More...
 
virtual std::string to_string () const =0
 Returns a string representation of the authentication source content. More...
 
virtual const std::string & id () const =0
 Returns the ID of the credentials. More...
 
virtual void id (const std::string &new_id)=0
 
virtual const ValidityInfovalidity () const =0
 Get the object that store info about the credential's validity. More...
 
virtual void validity (const ValidityInfo &c)=0
 Update the validity of the credential. More...
 
- Public Member Functions inherited from Leosac::Tools::IVisitable
virtual void accept (::Leosac::Tools::BaseVisitor &)=0
 Accept a visitor that may mutate this. More...
 
virtual void accept (::Leosac::Tools::BaseVisitor &) const =0
 Accept a visitor that will not mutate this. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Leosac::Tools::IVisitable
template<class T >
static bool visitor_dispatch (T &visited, BaseVisitor &visitor, bool abort_on_failure)
 

Detailed Description

An Auth source is a card id, a pin code, a fingerprint, etc...

Those sources can be combined to provide strong authentication mechanism. This class handle this.

Definition at line 40 of file IAuthenticationSource.hpp.

Constructor & Destructor Documentation

◆ ~IAuthenticationSource()

virtual Leosac::Auth::IAuthenticationSource::~IAuthenticationSource ( )
virtualdefault

Member Function Documentation

◆ addAuthSource()

virtual void Leosac::Auth::IAuthenticationSource::addAuthSource ( IAuthenticationSourcePtr  source)
pure virtual

Adds a new authentication sources as a subsource of this one.

Implemented in Leosac::Auth::BaseAuthSource.

◆ id() [1/2]

virtual const std::string& Leosac::Auth::IAuthenticationSource::id ( ) const
pure virtual

Returns the ID of the credentials.

It is possible that this ID be empty.

Implemented in Leosac::Auth::BaseAuthSource.

◆ id() [2/2]

virtual void Leosac::Auth::IAuthenticationSource::id ( const std::string &  new_id)
pure virtual

◆ name()

virtual const std::string& Leosac::Auth::IAuthenticationSource::name ( ) const
pure virtual

Return the name of the source.

This could be the name of the name of the module or device that sent the message that lead to this object's creation.

Implemented in Leosac::Auth::BaseAuthSource.

◆ owner() [1/2]

virtual UserPtr Leosac::Auth::IAuthenticationSource::owner ( ) const
pure virtual

Retrieve the user that map to this source.

Implemented in Leosac::Auth::BaseAuthSource.

◆ owner() [2/2]

virtual void Leosac::Auth::IAuthenticationSource::owner ( UserPtr  user)
pure virtual

Set the user that map to this source,.

Implemented in Leosac::Auth::BaseAuthSource.

◆ profile() [1/2]

virtual IAccessProfilePtr Leosac::Auth::IAuthenticationSource::profile ( ) const
pure virtual

Return (or generate) an Access Profile that make sense based on the data available in this AuthenticationSource object.

In addition to the user's profile, this profile will later be used to chose between granting and denying access to an end user.

Implemented in Leosac::Auth::BaseAuthSource.

◆ profile() [2/2]

virtual void Leosac::Auth::IAuthenticationSource::profile ( IAccessProfilePtr  p)
pure virtual

Set an access profile for this credentials.

This profile will be added to the user's profile when granting/denying acccess.

Implemented in Leosac::Auth::BaseAuthSource.

◆ to_string()

virtual std::string Leosac::Auth::IAuthenticationSource::to_string ( ) const
pure virtual

Returns a string representation of the authentication source content.

Implemented in Leosac::Auth::BaseAuthSource.

◆ validity() [1/2]

virtual const ValidityInfo& Leosac::Auth::IAuthenticationSource::validity ( ) const
pure virtual

Get the object that store info about the credential's validity.

Implemented in Leosac::Auth::BaseAuthSource.

◆ validity() [2/2]

virtual void Leosac::Auth::IAuthenticationSource::validity ( const ValidityInfo c)
pure virtual

Update the validity of the credential.

Implemented in Leosac::Auth::BaseAuthSource.


The documentation for this class was generated from the following file: