29#ifndef Pt_Http_Authenticator_h
30#define Pt_Http_Authenticator_h
32#include <Pt/Http/Api.h>
33#include <Pt/Http/Credentials.h>
34#include <Pt/NonCopyable.h>
81 const std::string&
name()
const
180 std::vector<Authentication*> _auths;
HTTP authentication method for clients.
Definition Authenticator.h:50
std::map< std::string, Credential > Credentials
Credentials for realms.
Definition Authenticator.h:53
Authentication(const std::string &name)
Construct with type name.
Definition Authenticator.h:61
const std::string & name() const
Returns the type name of the authentication.
Definition Authenticator.h:81
virtual ~Authentication()
Destructor.
Definition Authenticator.h:76
virtual bool authenticate(const Credentials &credentials, Request &request, const Reply &reply)=0
Authenticate a request in response to a reply.
Authentication(const char *name)
Construct with type name.
Definition Authenticator.h:70
std::map< std::string, Credential > Credentials
Credentials for realms.
Definition Authenticator.h:155
void addAuthentication(Authentication &auth)
Adds an authentication method.
void setCredential(const std::string &realm, const Credential &cred)
Set credential for a realm.
Authenticator()
Default Constructor.
~Authenticator()
Destructor.
bool authenticate(Request &request, const Reply &reply)
Authenticate a request in response to a reply.
Basic HTTP authentication for clients.
Definition Authenticator.h:100
virtual ~BasicAuthentication()
Destructor.
Definition Authenticator.h:110
void preAuthenticate(const Credential &credential, Request &request)
Writes basic credentials onto request before a challenge.
BasicAuthentication()
Default Constructor.
Definition Authenticator.h:104
virtual bool authenticate(const Credentials &credentials, Request &request, const Reply &reply)
Authenticates request from credentials in response to reply.
Credentials for authorization and authentication.
Definition Credentials.h:45
HTTP reply message.
Definition Reply.h:64
HTTP request message.
Definition Request.h:65
NonCopyable()
Default constructor.
Definition NonCopyable.h:63
HTTP clients and servers.
Core module.
Definition Allocator.h:33