1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2010 Brian Aker
5
* Copyright (C) 2008 Sun Microsystems
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 2 of the License.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#ifndef DRIZZLED_IDENTIFIER_USER_H
23
#define DRIZZLED_IDENTIFIER_USER_H
26
#include <boost/shared_ptr.hpp>
28
#include "drizzled/visibility.h"
37
@brief A set of Session members describing the current authenticated user.
40
class User : public Identifier
43
typedef boost::shared_ptr<User> shared_ptr;
44
typedef boost::shared_ptr<const User> const_shared_ptr;
45
typedef const User& const_reference;
46
DRIZZLED_API static shared_ptr make_shared();
55
password_type(PLAIN_TEXT),
60
virtual void getSQLPath(std::string &arg) const;
62
const std::string& address() const
67
void setAddress(const char *newip)
69
_address.assign(newip);
72
const std::string& username() const
77
void setUser(const std::string &newuser)
79
_user.assign(newuser);
82
PasswordType getPasswordType(void) const
87
void setPasswordType(PasswordType newpassword_type)
89
password_type= newpassword_type;
92
const std::string& getPasswordContext() const
94
return password_context;
97
void setPasswordContext(const char *newpassword_context, size_t size)
99
password_context.assign(newpassword_context, size);
103
PasswordType password_type;
105
std::string _address;
106
std::string password_context;
109
} /* namespace identifier */
110
} /* namespace drizzled */
112
#endif /* DRIZZLED_IDENTIFIER_USER_H */