- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

gpopauth.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2001-2013 Graeme Walker <graeme_walker@users.sourceforge.net>
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 // ===
20
21 #ifndef G_POP_AUTH_H
22 #define G_POP_AUTH_H
23
24 #include "gdef.h"
25 #include "gpop.h"
26 #include "gpopsecrets.h"
27
29 namespace GPop
30 {
31 class Auth ;
32 class AuthImp ;
33 }
34
43 class GPop::Auth
44 {
45 public:
46 explicit Auth( const Secrets & ) ;
50
51 ~Auth() ;
53
54 bool valid() const ;
56
57 bool init( const std::string & mechanism ) ;
61
62 bool mustChallenge() const ;
67
68 std::string challenge() ;
71
72 bool authenticated( const std::string & rsp1 , const std::string & rsp2 ) ;
83
84 std::string id() const ;
87
88 std::string mechanisms() const ;
91
92 bool sensitive() const ;
96
97 private:
98 Auth( const Auth & ) ;
99 void operator=( const Auth & ) ;
100
101 private:
102 AuthImp * m_imp ;
103 } ;
104
105 #endif
GPop::Secrets
A simple interface to a store of secrets as used in authentication.
Definition: gpopsecrets.h:44
GPop::Auth::mechanisms
std::string mechanisms() const
Returns a space-separated list of standard, supported SASL mechanisms (so not including APOP)...
Definition: gpopauth.cpp:152
GPop::Auth::mustChallenge
bool mustChallenge() const
Returns true if the init()ialised mechanism requires an initial challenge.
Definition: gpopauth.cpp:137
gpopsecrets.h
GPop::Auth::init
bool init(const std::string &mechanism)
Initialises or reinitialises with the specified mechanism.
Definition: gpopauth.cpp:127
GPop::Auth::challenge
std::string challenge()
Returns an initial challenge appropriate to the current mechanism.
Definition: gpopauth.cpp:142
GPop::Auth::id
std::string id() const
Returns the authenticated user id.
Definition: gpopauth.cpp:147
gpop.h
GPop::Auth::sensitive
bool sensitive() const
Returns true if the implementation requires authentication to be restricted to encrypted transports...
Definition: gpopauth.cpp:157
GPop::Auth::authenticated
bool authenticated(const std::string &rsp1, const std::string &rsp2)
Authenticates a one-step (APOP,PLAIN) or two-step (LOGIN) challenge-response sequence.
Definition: gpopauth.cpp:132
GPop::AuthImp
A private pimple-pattern implementation class used by GPop::Auth.
Definition: gpopauth.cpp:31
GPop::Auth::~Auth
~Auth()
Destructor.
Definition: gpopauth.cpp:117
GPop::Auth
An authenticator interface for POP3 sessions.
Definition: gpopauth.h:43
GPop::Auth::valid
bool valid() const
Returns true if the secrets are valid.
Definition: gpopauth.cpp:122
GPop
POP3 classes.
GPop::Auth::Auth
Auth(const Secrets &)
Constructor.
Definition: gpopauth.cpp:112