Kurlyk
Loading...
Searching...
No Matches
kurlyk::http::auth::IAuthProvider Class Referenceabstract

Interface for authentication providers that modify HTTP requests or headers. More...

#include <IAuthProvider.hpp>

Inheritance diagram for kurlyk::http::auth::IAuthProvider:
kurlyk::http::auth::ApiKeyAuthProvider kurlyk::http::auth::BearerTokenAuthProvider

Public Member Functions

virtual ~IAuthProvider ()
virtual bool authorize (HttpRequest &request) const =0
 Modifies an HttpRequest in-place to include authentication credentials.
virtual bool authorize (Headers &headers) const =0
 Modifies a header map in-place to include authentication credentials.

Detailed Description

Interface for authentication providers that modify HTTP requests or headers.

Definition at line 17 of file IAuthProvider.hpp.

Constructor & Destructor Documentation

◆ ~IAuthProvider()

virtual kurlyk::http::auth::IAuthProvider::~IAuthProvider ( )
inlinevirtual

Definition at line 19 of file IAuthProvider.hpp.

Member Function Documentation

◆ authorize() [1/2]

virtual bool kurlyk::http::auth::IAuthProvider::authorize ( Headers & headers) const
pure virtual

Modifies a header map in-place to include authentication credentials.

Parameters
headersThe headers to authorize.
Returns
true if authorization was applied successfully.

Implemented in kurlyk::http::auth::ApiKeyAuthProvider, and kurlyk::http::auth::BearerTokenAuthProvider.

◆ authorize() [2/2]

virtual bool kurlyk::http::auth::IAuthProvider::authorize ( HttpRequest & request) const
pure virtual

Modifies an HttpRequest in-place to include authentication credentials.

Parameters
requestThe HTTP request to authorize.
Returns
true if authorization was applied successfully.

Implemented in kurlyk::http::auth::ApiKeyAuthProvider, and kurlyk::http::auth::BearerTokenAuthProvider.


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