Leosac
0.8.0
Open Source Access Control
|
An ODB enabled credential object. More...
#include <Credential.hpp>
Public Member Functions | |
Credential () | |
virtual Auth::UserLPtr | owner () const override |
Retrieve the owner of the credential. More... | |
virtual void | owner (Auth::UserLPtr ptr) override |
Set a new owner for the credential. More... | |
virtual std::string | alias () const override |
An alias for the credential. More... | |
virtual CredentialId | id () const override |
Retrieve the identifier of the credential. More... | |
virtual void | id (const CredentialId &new_id) override |
Manually set the identifier of a credential. More... | |
virtual size_t | odb_version () const override |
Credentials are "optimistic" object (wrt ODB). More... | |
virtual Auth::UserId | owner_id () const override |
Returns the id of the owner, or 0 if there is no owner (or the owner has no id). More... | |
virtual void | alias (const std::string &id) override |
Set the alias for the credential. More... | |
virtual std::string | description () const override |
An optional description / notes for the credential. More... | |
virtual void | description (const std::string &str) override |
Set a description for this credential. More... | |
virtual void | validity (const Auth::ValidityInfo &info) override |
Provide the validity info object to the credential. More... | |
virtual const Auth::ValidityInfo & | validity () const override |
Retrieve validity status from the credential. More... | |
virtual std::vector< Tools::ScheduleMappingLWPtr > | lazy_schedules_mapping () const override |
Retrieve the lazy_weak_ptr to ScheduleMapping that map this credential. More... | |
void | schedule_mapping_added (const Tools::ScheduleMappingPtr &sched_mapping) |
The credential has been mapped by a schedule. More... | |
Public Member Functions inherited from Leosac::Cred::ICredential | |
MAKE_VISITABLE () | |
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 | |
CredentialId | id_ |
Auth::UserLPtr | owner_ |
std::string | alias_ |
std::string | description_ |
Auth::ValidityInfo | validity_ |
std::vector< Tools::ScheduleMappingLWPtr > | schedules_mapping_ |
size_t | odb_version_ |
Friends | |
class | odb::access |
class | ::Leosac::TestAccess |
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) |
An ODB enabled credential object.
Definition at line 37 of file Credential.hpp.
Credential::Credential | ( | ) |
Definition at line 27 of file Credential.cpp.
|
overridevirtual |
An alias for the credential.
Implements Leosac::Cred::ICredential.
Definition at line 43 of file Credential.cpp.
|
overridevirtual |
Set the alias for the credential.
Implements Leosac::Cred::ICredential.
Definition at line 70 of file Credential.cpp.
|
overridevirtual |
An optional description / notes for the credential.
Implements Leosac::Cred::ICredential.
Definition at line 76 of file Credential.cpp.
|
overridevirtual |
Set a description for this credential.
Implements Leosac::Cred::ICredential.
Definition at line 81 of file Credential.cpp.
|
overridevirtual |
Retrieve the identifier of the credential.
Implements Leosac::Cred::ICredential.
Definition at line 48 of file Credential.cpp.
|
overridevirtual |
Manually set the identifier of a credential.
This should generally not be use when database interaction may happen.
Implements Leosac::Cred::ICredential.
Definition at line 53 of file Credential.cpp.
|
overridevirtual |
Retrieve the lazy_weak_ptr to ScheduleMapping that map this credential.
Implements Leosac::Cred::ICredential.
Definition at line 96 of file Credential.cpp.
|
overridevirtual |
Credentials are "optimistic" object (wrt ODB).
This means they carry a version
field. This method returns the version.
Implements Leosac::Cred::ICredential.
Definition at line 58 of file Credential.cpp.
|
overridevirtual |
Retrieve the owner of the credential.
Implements Leosac::Cred::ICredential.
Definition at line 33 of file Credential.cpp.
|
overridevirtual |
Set a new owner for the credential.
Implements Leosac::Cred::ICredential.
Definition at line 38 of file Credential.cpp.
|
overridevirtual |
Returns the id
of the owner, or 0 if there is no owner (or the owner has no id).
Implements Leosac::Cred::ICredential.
Definition at line 63 of file Credential.cpp.
void Credential::schedule_mapping_added | ( | const Tools::ScheduleMappingPtr & | sched_mapping | ) |
The credential has been mapped by a schedule.
Definition at line 101 of file Credential.cpp.
|
overridevirtual |
Retrieve validity status from the credential.
Implements Leosac::Cred::ICredential.
Definition at line 91 of file Credential.cpp.
|
overridevirtual |
Provide the validity info object to the credential.
Implements Leosac::Cred::ICredential.
Definition at line 86 of file Credential.cpp.
|
friend |
Definition at line 94 of file Credential.hpp.
|
friend |
Definition at line 93 of file Credential.hpp.
|
protected |
Definition at line 80 of file Credential.hpp.
|
protected |
Definition at line 82 of file Credential.hpp.
|
protected |
Definition at line 76 of file Credential.hpp.
|
protected |
Definition at line 90 of file Credential.hpp.
|
protected |
Definition at line 78 of file Credential.hpp.
|
protected |
Definition at line 87 of file Credential.hpp.
|
protected |
Definition at line 84 of file Credential.hpp.