~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.h

  • Committer: Brian Aker
  • Date: 2009-11-24 02:06:37 UTC
  • mfrom: (1223.1.7 push)
  • Revision ID: brian@gaz-20091124020637-9gb65vj98x1arydm
MergeĀ forĀ staging.

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