morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::session::AllowAllAuthorizer Struct Reference

Default authorizer that permits everything. More...

#include <session.hpp>

Inheritance diagram for morph::session::AllowAllAuthorizer:
morph::session::IAuthorizer

Public Member Functions

bool authorize (const Context &ctx, std::string_view modelType, std::string_view actionType) const override
 Permits every call.
Public Member Functions inherited from morph::session::IAuthorizer
virtual std::optional< std::string > authenticate (const Context &ctx) const
 Returns the authenticated principal for ctx, or nullopt.
virtual Admission admit (const Context &ctx, std::string_view modelType, std::string_view actionType) const
 Authenticates and authorizes one call together.
virtual bool authorizeInstance (const Context &ctx, std::string_view modelType, std::string_view actionType, std::uint64_t modelId, std::string_view ownerPrincipal) const
 Optional per-**instance** authorization hook — the multi-tenant gate.
virtual bool authorizeRegister (const Context &ctx, std::string_view modelType) const
 Optional gate on model creation — bounds who may create an instance.

Detailed Description

Default authorizer that permits everything.

Wire it explicitly via RemoteServer(pool, dispatcher, registry, allowAll) for documentation, or rely on the server's default (which uses this type).

Definition at line 280 of file session.hpp.

Member Function Documentation

◆ authorize()

bool morph::session::AllowAllAuthorizer::authorize ( const Context & ctx,
std::string_view modelType,
std::string_view actionType ) const
inlinenodiscardoverridevirtual

Permits every call.

Parameters
ctxIgnored.
modelTypeIgnored.
actionTypeIgnored.
Returns
Always true.

Implements morph::session::IAuthorizer.

Definition at line 286 of file session.hpp.


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