~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: lbieber
  • Date: 2010-10-06 16:34:16 UTC
  • mfrom: (1816.1.3 build)
  • Revision ID: lbieber@orisndriz08-20101006163416-ea0sl59qgpglk21y
Merge Monty - Change the requirement from either libinnodb to libhaildb. Also, tied it to version 2.2
Merge Andrew - fix bug 650935: remove --compress from all clients
Merge Andrew - fix bug 653471: Add -A to drizzle client
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle

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