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
112 virtual bool authenticate(
const Credentials& credentials,
Request& request,
const Reply& reply);
138 void setCredential(
const std::string& realm,
const Credential& cred);
142 bool authenticate(
Request& request,
const Reply& reply);
146 std::vector<Authentication*> _auths;
154 #endif // Pt_Http_Authenticator_h
virtual ~Authentication()
Destructor.
Definition: Authenticator.h:74
HTTP request message.
Definition: Request.h:43
Protects derived classes from being copied.
Definition: NonCopyable.h:54
Client side authentication.
Definition: Authenticator.h:117
Credentials for authorization and authentication.
Definition: Credentials.h:42
Authentication(const std::string &name)
Construct with type name.
Definition: Authenticator.h:59
HTTP authentication for clients.
Definition: Authenticator.h:47
HTTP reply message.
Definition: Reply.h:43
BasicAuthentication()
Default Constructor.
Definition: Authenticator.h:100
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
std::map< std::string, Credential > Credentials
Credentials for realms.
Definition: Authenticator.h:121
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
Basic HTTP authentication for clients.
Definition: Authenticator.h:95
virtual ~BasicAuthentication()
Destructor.
Definition: Authenticator.h:106