ImFusion SDK 4.3
StaticAuthorizationProvider Class Reference

#include <ImFusion/Base/AuthorizationProvider.h>

A most basic AuthorizationProvider that only tracks a static list of authorization headers. More...

+ Inheritance diagram for StaticAuthorizationProvider:

Detailed Description

A most basic AuthorizationProvider that only tracks a static list of authorization headers.

Authorization headers need to be added manually and are neither refreshed nor can be acquired.

Public Member Functions

std::string authorization (const Filesystem::Url &url) const override
 Get the Authorization header for the given url.
 
bool refreshAuthorization (const Filesystem::Url &url, int numFailedRequests) override
 Does nothing if numFailedRequests is 0, otherwise calls removeAuthorization.
 
bool acquireAuthorization (const Filesystem::Url &url, const std::string &message) override
 Returns whether there is a header for the given url.
 
void removeAuthorization (const Filesystem::Url &url) override
 Removes the url from the headers.
 
void addAuthorization (Filesystem::Url url, std::string header)
 Adds a new header for the given url.
 
- Public Member Functions inherited from AuthorizationProvider
Filesystem::Url extractServerUrl (const Filesystem::Url &url) const
 Extract the server part of the URL.
 

Member Function Documentation

◆ authorization()

std::string authorization ( const Filesystem::Url & url) const
overridevirtual

Get the Authorization header for the given url.

The url is the complete url for the request that is going to be performed. Implementation should cache the value according to the server URL (see extractServerUrl). When an empty string is returned, no Authorization header should be send. This method will be called from multiple threads.

Implements AuthorizationProvider.

◆ refreshAuthorization()

bool refreshAuthorization ( const Filesystem::Url & url,
int numFailedRequests )
overridevirtual

Does nothing if numFailedRequests is 0, otherwise calls removeAuthorization.

Implements AuthorizationProvider.

◆ acquireAuthorization()

bool acquireAuthorization ( const Filesystem::Url & url,
const std::string & message )
overridevirtual

Returns whether there is a header for the given url.

Does nothing else.

Implements AuthorizationProvider.

◆ removeAuthorization()

void removeAuthorization ( const Filesystem::Url & url)
overridevirtual

Removes the url from the headers.

Implements AuthorizationProvider.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close