Leosac  0.8.0
Open Source Access Control
Leosac::Cred::ICredential Class Referenceabstract

Base interface for credential objects. More...

#include <ICredential.hpp>

+ Inheritance diagram for Leosac::Cred::ICredential:
+ Collaboration diagram for Leosac::Cred::ICredential:

Public Member Functions

 MAKE_VISITABLE ()
 
virtual CredentialId id () const =0
 Retrieve the identifier of the credential. More...
 
virtual void id (const CredentialId &new_id)=0
 Manually set the identifier of a credential. More...
 
virtual Auth::UserLPtr owner () const =0
 Retrieve the owner of the credential. More...
 
virtual Auth::UserId owner_id () const =0
 Returns the id of the owner, or 0 if there is no owner (or the owner has no id). More...
 
virtual void owner (Auth::UserLPtr)=0
 Set a new owner for the credential. More...
 
virtual std::string alias () const =0
 An alias for the credential. More...
 
virtual void alias (const std::string &)=0
 Set the alias for the credential. More...
 
virtual std::string description () const =0
 An optional description / notes for the credential. More...
 
virtual void description (const std::string &)=0
 Set a description for this credential. More...
 
virtual void validity (const Auth::ValidityInfo &)=0
 Provide the validity info object to the credential. More...
 
virtual const Auth::ValidityInfovalidity () const =0
 Retrieve validity status from the credential. More...
 
virtual std::vector< Tools::ScheduleMappingLWPtrlazy_schedules_mapping () const =0
 Retrieve the lazy_weak_ptr to ScheduleMapping that map this credential. More...
 
virtual size_t odb_version () const =0
 Credentials are "optimistic" object (wrt ODB). 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

Base interface for credential objects.

Definition at line 35 of file ICredential.hpp.

Member Function Documentation

◆ alias() [1/2]

virtual std::string Leosac::Cred::ICredential::alias ( ) const
pure virtual

An alias for the credential.

Implemented in Leosac::Cred::Credential.

◆ alias() [2/2]

virtual void Leosac::Cred::ICredential::alias ( const std::string &  )
pure virtual

Set the alias for the credential.

Implemented in Leosac::Cred::Credential.

◆ description() [1/2]

virtual std::string Leosac::Cred::ICredential::description ( ) const
pure virtual

An optional description / notes for the credential.

Implemented in Leosac::Cred::Credential.

◆ description() [2/2]

virtual void Leosac::Cred::ICredential::description ( const std::string &  )
pure virtual

Set a description for this credential.

Implemented in Leosac::Cred::Credential.

◆ id() [1/2]

virtual CredentialId Leosac::Cred::ICredential::id ( ) const
pure virtual

Retrieve the identifier of the credential.

Implemented in Leosac::Cred::Credential.

◆ id() [2/2]

virtual void Leosac::Cred::ICredential::id ( const CredentialId new_id)
pure virtual

Manually set the identifier of a credential.

This should generally not be use when database interaction may happen.

Implemented in Leosac::Cred::Credential.

◆ lazy_schedules_mapping()

virtual std::vector<Tools::ScheduleMappingLWPtr> Leosac::Cred::ICredential::lazy_schedules_mapping ( ) const
pure virtual

Retrieve the lazy_weak_ptr to ScheduleMapping that map this credential.

Implemented in Leosac::Cred::Credential.

◆ MAKE_VISITABLE()

Leosac::Cred::ICredential::MAKE_VISITABLE ( )

◆ odb_version()

virtual size_t Leosac::Cred::ICredential::odb_version ( ) const
pure virtual

Credentials are "optimistic" object (wrt ODB).

This means they carry a version field. This method returns the version.

Implemented in Leosac::Cred::Credential.

◆ owner() [1/2]

virtual Auth::UserLPtr Leosac::Cred::ICredential::owner ( ) const
pure virtual

Retrieve the owner of the credential.

Implemented in Leosac::Cred::Credential.

◆ owner() [2/2]

virtual void Leosac::Cred::ICredential::owner ( Auth::UserLPtr  )
pure virtual

Set a new owner for the credential.

Implemented in Leosac::Cred::Credential.

◆ owner_id()

virtual Auth::UserId Leosac::Cred::ICredential::owner_id ( ) const
pure virtual

Returns the id of the owner, or 0 if there is no owner (or the owner has no id).

Implemented in Leosac::Cred::Credential.

◆ validity() [1/2]

virtual const Auth::ValidityInfo& Leosac::Cred::ICredential::validity ( ) const
pure virtual

Retrieve validity status from the credential.

Implemented in Leosac::Cred::Credential.

◆ validity() [2/2]

virtual void Leosac::Cred::ICredential::validity ( const Auth::ValidityInfo )
pure virtual

Provide the validity info object to the credential.

Implemented in Leosac::Cred::Credential.


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