~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Stewart Smith
  • Date: 2010-02-05 01:20:18 UTC
  • mto: (1286.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1287.
  • Revision ID: stewart@flamingspork.com-20100205012018-blvmeky20wze8eyg
initial TableProtoTester engine. We can't just use table_write as some protobuf library versions don't let us write invalid protobuf messages :(

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 *  Definitions required for Authentication plugin
5
5
 *
6
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
6
 *  Copyright (C) 2008 Sun Microsystems
7
7
 *
8
8
 *  This program is free software; you can redistribute it and/or modify
9
9
 *  it under the terms of the GNU General Public License as published by
22
22
#ifndef DRIZZLED_PLUGIN_AUTHENTICATION_H
23
23
#define DRIZZLED_PLUGIN_AUTHENTICATION_H
24
24
 
25
 
#include <string>
26
 
 
27
 
#include "drizzled/plugin.h"
28
25
#include "drizzled/plugin/plugin.h"
29
 
#include "drizzled/identifier.h"
30
26
 
31
 
#include "drizzled/visibility.h"
 
27
class Session;
32
28
 
33
29
namespace drizzled
34
30
{
35
 
 
36
 
namespace identifier {
37
 
class User;
38
 
39
 
 
40
31
namespace plugin
41
32
{
42
33
 
43
 
class DRIZZLED_API Authentication : public Plugin
 
34
class Authentication : public Plugin
44
35
{
45
36
  Authentication();
46
37
  Authentication(const Authentication &);
51
42
  {}
52
43
  virtual ~Authentication() {}
53
44
 
54
 
  virtual bool authenticate(const identifier::User &sctx,
55
 
                            const std::string &passwd)= 0;
 
45
  virtual bool authenticate(Session *, const char *)= 0;
56
46
 
57
47
  static bool addPlugin(plugin::Authentication *auth);
58
48
  static void removePlugin(plugin::Authentication *auth);
59
 
  static bool isAuthenticated(drizzled::identifier::User::const_shared_ptr sctx,
60
 
                              const std::string &password);
 
49
  static bool isAuthenticated(Session *session, const char *password);
61
50
};
62
51
 
63
52
} /* namespace plugin */