~jaypipes/drizzle/xa-transaction-log

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Jay Pipes
  • Date: 2010-03-05 18:24:28 UTC
  • mfrom: (1273.1.51 staging)
  • Revision ID: jpipes@serialcoder-20100305182428-9m16fszbs3mvdhe0
Merge 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 */