xentara-plugin v2.0.4
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::security::Authorization Class Referencefinal

A authorization that contains the entitlements of an authenticated user. More...

#include <xentara/security/Authorization.hpp>

Public Member Functions

 Authorization ()=default
 Default constructor.
 
 operator bool () const noexcept
 Determines if the authorization contains any entitlements at all.
 

Detailed Description

A authorization that contains the entitlements of an authenticated user.

Constructor & Destructor Documentation

◆ Authorization()

xentara::security::Authorization::Authorization ( )
default

Default constructor.

This constructor creates an authorization that has no entitlements whatsoever, not even the entitlements granted to the role “Everyone”.

To get an authorization that represents a real user, use security::Context::authenticate().

Member Function Documentation

◆ operator bool()

xentara::security::Authorization::operator bool ( ) const
explicitnoexcept

Determines if the authorization contains any entitlements at all.

Returns
Returns true if the object contains an authorization for a known entity, and thus has access to at least the entitlements for the role “Everyone”. Returns false if the object has no entitlements whatsoever, not even the entitlements granted to the role “Everyone”. This is the case for a default constructed object, for example.