7#ifndef Glacier2_PermissionsVerifier_h_
8#define Glacier2_PermissionsVerifier_h_
13#include <Glacier2/Config.h>
15#ifndef ICE_DISABLE_VERSION
16# if ICE_INT_VERSION != 30850
17# error Ice version mismatch: an exact match is required for beta generated code
22# if defined(GLACIER2_API_EXPORTS)
23# define GLACIER2_API ICE_DECLSPEC_EXPORT
25# define GLACIER2_API ICE_DECLSPEC_IMPORT
59 ~PermissionsVerifierPrx()
override;
114 std::function<void()>
checkPermissionsAsync(std::string_view userId, std::string_view password, std::function<
void(
bool, std::string)> response, std::function<
void(std::exception_ptr)> exception =
nullptr, std::function<
void(
bool)> sent =
nullptr,
const Ice::Context& context =
Ice::noExplicitContext)
const;
117 void _iceI_checkPermissions(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<bool, std::string>>>&, std::string_view, std::string_view,
const Ice::Context&)
const;
155 ~SSLPermissionsVerifierPrx()
override;
210 void _iceI_authorize(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<bool, std::string>>>&,
const SSLInfo&,
const Ice::Context&)
const;
252 [[nodiscard]] std::tuple<const std::string&>
ice_tuple()
const
262 [[nodiscard]] const
char*
ice_id() const noexcept override;
271 void _writeImpl(
Ice::OutputStream*) const override;
274 void _readImpl(
Ice::InputStream*) override;
360#include <Ice/PopDisableWarnings.h>
std::string reason
The reason why permission was denied.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_throw() const override
Throws this exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
PermissionDeniedException(const PermissionDeniedException &) noexcept=default
Copy constructor.
PermissionDeniedException() noexcept=default
Default constructor.
PermissionsVerifierPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
std::function< void()> checkPermissionsAsync(std::string_view userId, std::string_view password, std::function< void(bool, std::string)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Checks if a user is authorized to establish a session.
PermissionsVerifierPrx & operator=(PermissionsVerifierPrx &&rhs) noexcept
Move assignment operator.
std::future< std::tuple< bool, std::string > > checkPermissionsAsync(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Checks if a user is authorized to establish a session.
PermissionsVerifierPrx & operator=(const PermissionsVerifierPrx &rhs) noexcept
Copy assignment operator.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
PermissionsVerifierPrx(const PermissionsVerifierPrx &other) noexcept
Copy constructor.
PermissionsVerifierPrx(PermissionsVerifierPrx &&other) noexcept
Move constructor.
bool checkPermissions(std::string_view userId, std::string_view password, std::string &reason, const Ice::Context &context=Ice::noExplicitContext) const
Checks if a user is authorized to establish a session.
Represents an object that checks user permissions.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
std::vector< std::string > ice_ids(const Ice::Current ¤t) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
PermissionsVerifierPrx ProxyType
The associated proxy type.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::string ice_id(const Ice::Current ¤t) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual bool checkPermissions(std::string userId, std::string password, std::string &reason, const Ice::Current ¤t) const =0
Checks if a user is authorized to establish a session.
Represents an object that checks user permissions.
SSLPermissionsVerifierPrx & operator=(const SSLPermissionsVerifierPrx &rhs) noexcept
Copy assignment operator.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::function< void()> authorizeAsync(const SSLInfo &info, std::function< void(bool, std::string)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Checks if a user is authorized to establish a session.
bool authorize(const SSLInfo &info, std::string &reason, const Ice::Context &context=Ice::noExplicitContext) const
Checks if a user is authorized to establish a session.
SSLPermissionsVerifierPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
std::future< std::tuple< bool, std::string > > authorizeAsync(const SSLInfo &info, const Ice::Context &context=Ice::noExplicitContext) const
Checks if a user is authorized to establish a session.
SSLPermissionsVerifierPrx(const SSLPermissionsVerifierPrx &other) noexcept
Copy constructor.
SSLPermissionsVerifierPrx & operator=(SSLPermissionsVerifierPrx &&rhs) noexcept
Move assignment operator.
SSLPermissionsVerifierPrx(SSLPermissionsVerifierPrx &&other) noexcept
Move constructor.
Represents an object that checks user permissions.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
SSLPermissionsVerifierPrx ProxyType
The associated proxy type.
virtual bool authorize(SSLInfo info, std::string &reason, const Ice::Current ¤t) const =0
Checks if a user is authorized to establish a session.
std::string ice_id(const Ice::Current ¤t) const override
Gets the type ID of the most-derived Slice interface supported by this object.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
std::vector< std::string > ice_ids(const Ice::Current ¤t) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
Represents an object that checks user permissions.
Represents a request received by a connection.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Object() noexcept=default
Default constructor.
The base class for servants.
Represents the response to an incoming request.
Provides typed proxy functions.
Abstract base class for all Ice exceptions defined in Slice.
std::shared_ptr< SSLPermissionsVerifier > SSLPermissionsVerifierPtr
A shared pointer to a SSLPermissionsVerifier.
std::shared_ptr< PermissionsVerifier > PermissionsVerifierPtr
A shared pointer to a PermissionsVerifier.
Communicate through firewalls and across NATs.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Represents information gathered from an incoming SSL connection and used for authentication and autho...
Provides information about an incoming request being dispatched.