~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Brian Aker
  • Date: 2010-12-18 10:14:05 UTC
  • mfrom: (2008.1.3 clean)
  • Revision ID: brian@tangent.org-20101218101405-qjbse29shi9coklg
Merge of user identifier work

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "drizzled/plugin.h"
28
28
#include "drizzled/plugin/plugin.h"
 
29
#include "drizzled/identifier.h"
29
30
 
30
31
namespace drizzled
31
32
{
32
 
class SecurityContext;
 
33
 
 
34
namespace identifier {
 
35
class User;
 
36
33
37
 
34
38
namespace plugin
35
39
{
45
49
  {}
46
50
  virtual ~Authentication() {}
47
51
 
48
 
  virtual bool authenticate(const SecurityContext &sctx,
 
52
  virtual bool authenticate(const identifier::User &sctx,
49
53
                            const std::string &passwd)= 0;
50
54
 
51
55
  static bool addPlugin(plugin::Authentication *auth);
52
56
  static void removePlugin(plugin::Authentication *auth);
53
 
  static bool isAuthenticated(const SecurityContext &sctx,
 
57
  static bool isAuthenticated(drizzled::identifier::User::const_shared_ptr sctx,
54
58
                              const std::string &password);
55
59
};
56
60