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>
79 const std::string&
name()
const
146 std::vector<Authentication*> _auths;
154 #endif // Pt_Http_Authenticator_h
Core module.
Definition: pt-gfx-images.dox:14
void setCredential(const std::string &realm, const Credential &cred)
Set credential for a realm.
HTTP request message.
Definition: Request.h:44
void addAuthentication(Authentication &auth)
Adds an authentication method.
HTTP reply message.
Definition: Reply.h:44
HTTP authentication for clients.
Definition: Authenticator.h:48
Authenticator()
Default Constructor.
virtual bool authenticate(const Credentials &credentials, Request &request, const Reply &reply)=0
Authenticate a request in response to a reply.
std::map< std::string, Credential > Credentials
Credentials for realms.
Definition: Authenticator.h:51
Client side authentication.
Definition: Authenticator.h:118
Authentication(const char *name)
Construct with type name.
Definition: Authenticator.h:68
const std::string & name() const
Returns the type name of the authentication.
Definition: Authenticator.h:79
virtual ~Authentication()
Destructor.
Definition: Authenticator.h:74
BasicAuthentication()
Default Constructor.
Definition: Authenticator.h:100
virtual bool authenticate(const Credentials &credentials, Request &request, const Reply &reply)
Authenticate a request in response to a reply.
Credentials for authorization and authentication.
Definition: Credentials.h:43
virtual ~BasicAuthentication()
Destructor.
Definition: Authenticator.h:106
Protects derived classes from being copied.
Definition: NonCopyable.h:54
bool authenticate(Request &request, const Reply &reply)
Authenticate a request in response to a reply.
Authentication(const std::string &name)
Construct with type name.
Definition: Authenticator.h:59
~Authenticator()
Destructor.
Basic HTTP authentication for clients.
Definition: Authenticator.h:96
std::map< std::string, Credential > Credentials
Credentials for realms.
Definition: Authenticator.h:121