E-MailRelay

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

gsaslserverbasic.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2001-2018 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 // ===
17 ///
18 /// \file gsaslserverbasic.h
19 ///
20
21 #ifndef G_SASL_SERVER_BASIC_H
22 #define G_SASL_SERVER_BASIC_H
23
24 #include "gdef.h"
25 #include "gvalid.h"
26 #include "gsecrets.h"
27 #include "gsaslserver.h"
28 #include "gexception.h"
29 #include "gaddress.h"
30 #include "gstrings.h"
31 #include "gpath.h"
32 #include <map>
33 #include <memory>
34
35 namespace GAuth
36 {
37 class SaslServerBasicImp ;
38 class SaslServerBasic ;
39 }
40
41 /// \class GAuth::SaslServerBasic
42 /// An implementation of the SaslServer interface that does not use pluggable modules.
43 /// \see GAuth::SaslServerPam
44 ///
45 class GAuth::SaslServerBasic : public SaslServer
46 {
47 public:
48 explicit SaslServerBasic( const SaslServerSecrets & , bool allow_apop ) ;
49 ///< Constructor.
50
51 virtual ~SaslServerBasic() ;
52 ///< Destructor.
53
54 virtual bool requiresEncryption() const override ;
55 ///< Override from GAuth::SaslServer.
56
57 virtual bool active() const override ;
58 ///< Override from GAuth::SaslServer.
59
60 virtual std::string mechanisms( char sep = ' ' ) const override ;
61 ///< Override from GAuth::SaslServer.
62
63 virtual bool init( const std::string & mechanism ) override ;
64 ///< Override from GAuth::SaslServer.
65
66 virtual std::string mechanism() const override ;
67 ///< Override from GAuth::SaslServer.
68
69 virtual bool mustChallenge() const override ;
70 ///< Override from GAuth::SaslServer.
71
72 virtual std::string initialChallenge() const override ;
73 ///< Override from GAuth::SaslServer.
74
75 virtual std::string apply( const std::string & response , bool & done ) override ;
76 ///< Override from GAuth::SaslServer.
77
78 virtual bool authenticated() const override ;
79 ///< Override from GAuth::SaslServer.
80
81 virtual std::string id() const override ;
82 ///< Override from GAuth::SaslServer.
83
84 virtual bool trusted( const GNet::Address & ) const override ;
85 ///< Override from GAuth::SaslServer.
86
87 private:
88 SaslServerBasic( const SaslServerBasic & ) ;
89 void operator=( const SaslServerBasic & ) ;
90
91 private:
92 SaslServerBasicImp * m_imp ;
93 } ;
94
95 #endif
GAuth::SaslServerBasic::mechanism
virtual std::string mechanism() const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:308
gstrings.h
GAuth::SaslServerBasic::mechanisms
virtual std::string mechanisms(char sep= ' ') const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:303
GAuth::SaslServerBasic
An implementation of the SaslServer interface that does not use pluggable modules.
Definition: gsaslserverbasic.h:45
GAuth::SaslServerBasic::~SaslServerBasic
virtual ~SaslServerBasic()
Destructor.
Definition: gsaslserverbasic.cpp:298
GAuth::SaslServerBasic::mustChallenge
virtual bool mustChallenge() const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:328
GAuth::SaslServerBasic::apply
virtual std::string apply(const std::string &response, bool &done) override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:339
GNet::Address
The GNet::Address class encapsulates a TCP/UDP transport address.
Definition: gaddress.h:54
gsaslserver.h
GAuth::SaslServerBasic::active
virtual bool active() const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:318
GAuth::SaslServerBasic::requiresEncryption
virtual bool requiresEncryption() const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:354
GAuth::SaslServerSecrets
An interface used by GAuth::SaslServer to obtain authentication secrets.
Definition: gsaslserversecrets.h:39
GAuth::SaslServerBasic::authenticated
virtual bool authenticated() const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:344
gsecrets.h
GAuth::SaslServer
An interface for implementing the server-side SASL challenge/response concept.
Definition: gsaslserver.h:67
GAuth::SaslServerBasicImp
A private pimple-pattern implementation class used by GAuth::SaslServerBasic.
Definition: gsaslserverbasic.cpp:43
gvalid.h
GAuth::SaslServerBasic::trusted
virtual bool trusted(const GNet::Address &) const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:313
gexception.h
gpath.h
gaddress.h
GAuth
SASL authentication classes.
Definition: gcram.h:30
GAuth::SaslServerBasic::init
virtual bool init(const std::string &mechanism) override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:323
GAuth::SaslServerBasic::initialChallenge
virtual std::string initialChallenge() const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:334
GAuth::SaslServerBasic::SaslServerBasic
SaslServerBasic(const SaslServerSecrets &, bool allow_apop)
Constructor.
Definition: gsaslserverbasic.cpp:293
GAuth::SaslServerBasic::id
virtual std::string id() const override
Override from GAuth::SaslServer.
Definition: gsaslserverbasic.cpp:349