~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Stewart Smith
  • Date: 2009-10-08 12:39:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1179.
  • Revision ID: stewart@flamingspork.com-20091008123927-qpf9hog04w4xc5aj
make directory_file_name() static to mysys/my_lib.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
#include "drizzled/plugin/plugin.h"
29
 
 
30
25
namespace drizzled
31
26
{
32
 
class SecurityContext;
33
 
 
34
27
namespace plugin
35
28
{
36
29
 
37
 
class Authentication : public Plugin
 
30
class Authentication
38
31
{
39
 
  Authentication();
40
 
  Authentication(const Authentication &);
41
 
  Authentication& operator=(const Authentication &);
42
32
public:
43
 
  explicit Authentication(std::string name_arg)
44
 
    : Plugin(name_arg, "Authentication")
45
 
  {}
 
33
  Authentication() {}
46
34
  virtual ~Authentication() {}
47
35
 
48
 
  virtual bool authenticate(const SecurityContext &sctx,
49
 
                            const std::string &passwd)= 0;
 
36
  virtual bool authenticate(Session *, const char *)= 0;
50
37
 
51
38
  static bool addPlugin(plugin::Authentication *auth);
52
39
  static void removePlugin(plugin::Authentication *auth);
53
 
  static bool isAuthenticated(const SecurityContext &sctx,
54
 
                              const std::string &password);
 
40
  static bool isAuthenticated(Session *session, const char *password);
55
41
};
56
42
 
57
43
} /* namespace plugin */