~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Brian Aker
  • Date: 2010-01-27 18:58:12 UTC
  • Revision ID: brian@gaz-20100127185812-n62n0vwetnx8jrjy
Remove dead code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
  Definitions required for Authentication plugin 
3
 
*/
 
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Definitions required for Authentication plugin
 
5
 *
 
6
 *  Copyright (C) 2008 Sun Microsystems
 
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
 */
4
21
 
5
22
#ifndef DRIZZLED_PLUGIN_AUTHENTICATION_H
6
23
#define DRIZZLED_PLUGIN_AUTHENTICATION_H
7
24
 
8
 
typedef struct authentication_st
9
 
{
10
 
  bool (*authenticate)(THD *thd, const char *password);
11
 
} authentication_st;
 
25
#include "drizzled/plugin/plugin.h"
 
26
 
 
27
class Session;
 
28
 
 
29
namespace drizzled
 
30
{
 
31
namespace plugin
 
32
{
 
33
 
 
34
class Authentication : public Plugin
 
35
{
 
36
  Authentication();
 
37
  Authentication(const Authentication &);
 
38
  Authentication& operator=(const Authentication &);
 
39
public:
 
40
  explicit Authentication(std::string name_arg)
 
41
    : Plugin(name_arg, "Authentication")
 
42
  {}
 
43
  virtual ~Authentication() {}
 
44
 
 
45
  virtual bool authenticate(Session *, const char *)= 0;
 
46
 
 
47
  static bool addPlugin(plugin::Authentication *auth);
 
48
  static void removePlugin(plugin::Authentication *auth);
 
49
  static bool isAuthenticated(Session *session, const char *password);
 
50
};
 
51
 
 
52
} /* namespace plugin */
 
53
} /* namespace drizzled */
12
54
 
13
55
#endif /* DRIZZLED_PLUGIN_AUTHENTICATION_H */