Leosac
0.8.0
Open Source Access Control
|
#include <BaseAuthSource.hpp>
Public Member Functions | |
MAKE_VISITABLE () | |
BaseAuthSource (const std::string &id="") | |
virtual | ~BaseAuthSource ()=default |
virtual void | addAuthSource (IAuthenticationSourcePtr source) override |
Adds a new authentication sources as a subsource of this one. More... | |
virtual void | owner (UserPtr user) override |
Set the user that map to this source,. More... | |
virtual UserPtr | owner () const override |
Retrieve the user that map to this source. More... | |
virtual IAccessProfilePtr | profile () const override |
This implementation simply return the profile associated with the credential, or null if not available. More... | |
virtual void | profile (IAccessProfilePtr p) override |
Set an access profile for this credentials. More... | |
virtual const std::string & | name () const override |
Return the name of the source. More... | |
void | name (const std::string &n) |
Set a name for this auth source. More... | |
virtual std::string | to_string () const override |
Returns a string representation of the authentication source content. More... | |
virtual const std::string & | id () const override |
Returns the ID of the credentials. More... | |
void | id (const std::string &cred_id) override |
virtual const ValidityInfo & | validity () const override |
Get the object that store info about the credential's validity. More... | |
virtual void | validity (const ValidityInfo &c) override |
Update the validity of the credential. More... | |
Public Member Functions inherited from Leosac::Auth::IAuthenticationSource | |
virtual | ~IAuthenticationSource ()=default |
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... | |
Protected Attributes | |
UserPtr | owner_ |
Which user this auth source maps to. More... | |
std::vector< IAuthenticationSourcePtr > | subsources_ |
Underlying auth source. More... | |
std::string | source_name_ |
Name of the source (generally the module / device that sent it) More... | |
std::string | id_ |
Credentials ID. More... | |
ValidityInfo | validity_ |
IAccessProfilePtr | profile_ |
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) |
Definition at line 34 of file BaseAuthSource.hpp.
BaseAuthSource::BaseAuthSource | ( | const std::string & | id = "" | ) |
Definition at line 24 of file BaseAuthSource.cpp.
|
virtualdefault |
|
overridevirtual |
Adds a new authentication sources as a subsource of this one.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 29 of file BaseAuthSource.cpp.
|
overridevirtual |
Returns the ID of the credentials.
It is possible that this ID be empty.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 64 of file BaseAuthSource.cpp.
|
overridevirtual |
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 69 of file BaseAuthSource.cpp.
Leosac::Auth::BaseAuthSource::MAKE_VISITABLE | ( | ) |
|
overridevirtual |
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.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 49 of file BaseAuthSource.cpp.
void BaseAuthSource::name | ( | const std::string & | n | ) |
Set a name for this auth source.
Definition at line 54 of file BaseAuthSource.cpp.
|
overridevirtual |
Retrieve the user that map to this source.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 39 of file BaseAuthSource.cpp.
|
overridevirtual |
Set the user that map to this source,.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 34 of file BaseAuthSource.cpp.
|
overridevirtual |
This implementation simply return the profile associated with the credential, or null if not available.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 44 of file BaseAuthSource.cpp.
|
overridevirtual |
Set an access profile for this credentials.
This profile will be added to the user's profile when granting/denying acccess.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 84 of file BaseAuthSource.cpp.
|
overridevirtual |
Returns a string representation of the authentication source content.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 59 of file BaseAuthSource.cpp.
|
overridevirtual |
Get the object that store info about the credential's validity.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 74 of file BaseAuthSource.cpp.
|
overridevirtual |
Update the validity of the credential.
Implements Leosac::Auth::IAuthenticationSource.
Definition at line 79 of file BaseAuthSource.cpp.
|
protected |
Credentials ID.
Definition at line 91 of file BaseAuthSource.hpp.
|
protected |
|
protected |
Definition at line 95 of file BaseAuthSource.hpp.
|
protected |
Name of the source (generally the module / device that sent it)
Definition at line 86 of file BaseAuthSource.hpp.
|
protected |
Underlying auth source.
Definition at line 81 of file BaseAuthSource.hpp.
|
protected |
Definition at line 93 of file BaseAuthSource.hpp.