~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

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