~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
1130.1.12 by Monty Taylor
Moved service stuff into plugin/
3
 *
660.1.3 by Eric Herman
removed trailing whitespace with simple script:
4
 *  Definitions required for Authentication plugin
390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
5
 *
1010 by Brian Aker
Replacing Sun employee copyright headers (aka... anything done by a Sun
6
 *  Copyright (C) 2008 Sun Microsystems
390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
7
 *
8
 *  This program is free software; you can redistribute it and/or modify
9
 *  it under the terms of the GNU General Public License as published by
10
 *  the Free Software Foundation; version 2 of the License.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program; if not, write to the Free Software
19
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
 */
21
259 by Brian Aker
First pass on PAM auth
22
#ifndef DRIZZLED_PLUGIN_AUTHENTICATION_H
23
#define DRIZZLED_PLUGIN_AUTHENTICATION_H
24
1317.1.3 by Monty Taylor
Fixed Authentication plugin interface to use SecurityContext rather than the
25
#include <string>
26
27
#include "drizzled/plugin.h"
1237.9.3 by Padraig O'Sullivan
Removed one the includes I put in server_includes.h for the last commit to get rid of the inclusion
28
#include "drizzled/plugin/plugin.h"
2008.1.1 by Brian Aker
Adding user identifier that makes use of a shared ptr to handle concurrency
29
#include "drizzled/identifier.h"
1237.9.3 by Padraig O'Sullivan
Removed one the includes I put in server_includes.h for the last commit to get rid of the inclusion
30
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
31
namespace drizzled
32
{
2008.1.1 by Brian Aker
Adding user identifier that makes use of a shared ptr to handle concurrency
33
34
namespace identifier {
35
class User;
36
} 
1122.2.13 by Monty Taylor
Header cleanup.
37
1130.1.1 by Monty Taylor
Merged in plugin-slot-reorg patches.
38
namespace plugin
39
{
40
1130.2.5 by Monty Taylor
Some carnage. I'm sure it'll need fixed.
41
class Authentication : public Plugin
259 by Brian Aker
First pass on PAM auth
42
{
1130.2.5 by Monty Taylor
Some carnage. I'm sure it'll need fixed.
43
  Authentication();
44
  Authentication(const Authentication &);
1130.2.16 by Monty Taylor
Cleaned up the constructor initializer lists per Brian.
45
  Authentication& operator=(const Authentication &);
942.1.14 by Monty Taylor
Changed authentication_st to class Authentication.
46
public:
1192.2.5 by Monty Taylor
Replaced overridable virtual methods with passing name to constructor. Now individual plugins will not be allowed to set their own plugin type name. :)
47
  explicit Authentication(std::string name_arg)
48
    : Plugin(name_arg, "Authentication")
49
  {}
942.1.14 by Monty Taylor
Changed authentication_st to class Authentication.
50
  virtual ~Authentication() {}
51
2008.1.1 by Brian Aker
Adding user identifier that makes use of a shared ptr to handle concurrency
52
  virtual bool authenticate(const identifier::User &sctx,
1317.1.3 by Monty Taylor
Fixed Authentication plugin interface to use SecurityContext rather than the
53
                            const std::string &passwd)= 0;
942.1.14 by Monty Taylor
Changed authentication_st to class Authentication.
54
1130.1.19 by Monty Taylor
Added error reporting to plugin registration.
55
  static bool addPlugin(plugin::Authentication *auth);
1130.1.18 by Monty Taylor
Changed ::add() and ::remove() to ::addPlugin() and ::removePlugin() so that
56
  static void removePlugin(plugin::Authentication *auth);
2008.1.1 by Brian Aker
Adding user identifier that makes use of a shared ptr to handle concurrency
57
  static bool isAuthenticated(drizzled::identifier::User::const_shared_ptr sctx,
1317.1.3 by Monty Taylor
Fixed Authentication plugin interface to use SecurityContext rather than the
58
                              const std::string &password);
942.1.14 by Monty Taylor
Changed authentication_st to class Authentication.
59
};
259 by Brian Aker
First pass on PAM auth
60
1130.1.1 by Monty Taylor
Merged in plugin-slot-reorg patches.
61
} /* namespace plugin */
62
} /* namespace drizzled */
63
259 by Brian Aker
First pass on PAM auth
64
#endif /* DRIZZLED_PLUGIN_AUTHENTICATION_H */