~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to drizzled/security_context.h

  • Committer: Padraig O'Sullivan
  • Date: 2010-04-17 01:38:47 UTC
  • mfrom: (1237.9.238 bad-staging)
  • Revision ID: osullivan.padraig@gmail.com-20100417013847-ibjioqsfbmf5yg4g
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
class SecurityContext {
35
35
public:
36
 
  SecurityContext() {}
 
36
  enum PasswordType
 
37
  {
 
38
    PLAIN_TEXT,
 
39
    MYSQL_HASH
 
40
  };
 
41
 
 
42
  SecurityContext():
 
43
    password_type(PLAIN_TEXT)
 
44
  { }
37
45
 
38
46
  const std::string& getIp() const
39
47
  {
55
63
    user.assign(newuser);
56
64
  }
57
65
 
 
66
  PasswordType getPasswordType(void) const
 
67
  {
 
68
    return password_type;
 
69
  }
 
70
 
 
71
  void setPasswordType(PasswordType newpassword_type)
 
72
  {
 
73
    password_type= newpassword_type;
 
74
  }
 
75
 
 
76
  const std::string& getPasswordContext() const
 
77
  {
 
78
    return password_context;
 
79
  }
 
80
 
 
81
  void setPasswordContext(const char *newpassword_context, size_t size)
 
82
  {
 
83
    password_context.assign(newpassword_context, size);
 
84
  }
 
85
 
58
86
private:
 
87
  PasswordType password_type;
59
88
  std::string user;
60
89
  std::string ip;
 
90
  std::string password_context;
61
91
};
62
92
 
63
93
} /* namespace drizzled */