~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Monty Taylor
  • Date: 2010-03-11 18:27:20 UTC
  • mfrom: (1333 staging)
  • mto: This revision was merged to the branch mainline in revision 1348.
  • Revision ID: mordred@inaugust.com-20100311182720-hd1h87y6cb1b1mp0
Merged trunk.

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