#include <Authn.h>
Inherits dmlite::Authn.
Inheritance diagram for dmlite::BuiltInAuthn:
Public Member Functions | |
BuiltInAuthn (const std::string &, const std::string &) | |
~BuiltInAuthn () | |
std::string | getImplId (void) const throw () |
String ID of the user DB implementation. | |
virtual SecurityContext * | createSecurityContext (const SecurityCredentials &cred) throw (DmException) |
virtual SecurityContext * | createSecurityContext () throw (DmException) |
GroupInfo | newGroup (const std::string &gname) throw (DmException) |
GroupInfo | getGroup (gid_t gid) throw (DmException) |
GroupInfo | getGroup (const std::string &groupName) throw (DmException) |
GroupInfo | getGroup (const std::string &key, const boost::any &value) throw (DmException) |
void | updateGroup (const GroupInfo &group) throw (DmException) |
void | deleteGroup (const std::string &groupName) throw (DmException) |
Delete a group. | |
UserInfo | newUser (const std::string &uname) throw (DmException) |
UserInfo | getUser (const std::string &userName) throw (DmException) |
UserInfo | getUser (const std::string &userName, gid_t *group) throw (DmException) |
UserInfo | getUser (const std::string &key, const boost::any &value) throw (DmException) |
void | updateUser (const UserInfo &user) throw (DmException) |
void | deleteUser (const std::string &userName) throw (DmException) |
Delete a user. | |
std::vector< GroupInfo > | getGroups (void) throw (DmException) |
Get the group list. | |
std::vector< UserInfo > | getUsers (void) throw (DmException) |
Get the user list. | |
void | getIdMap (const std::string &userName, const std::vector< std::string > &groupNames, UserInfo *user, std::vector< GroupInfo > *groups) throw (DmException) |
Private Attributes | |
std::string | nobody_ |
std::string | nogroup_ |
dmlite::BuiltInAuthn::BuiltInAuthn | ( | const std::string & | , | |
const std::string & | ||||
) |
dmlite::BuiltInAuthn::~BuiltInAuthn | ( | ) |
virtual SecurityContext* dmlite::BuiltInAuthn::createSecurityContext | ( | ) | throw (DmException) [virtual] |
Create a default security context.
Reimplemented from dmlite::Authn.
virtual SecurityContext* dmlite::BuiltInAuthn::createSecurityContext | ( | const SecurityCredentials & | cred | ) | throw (DmException) [virtual] |
Create a security context from the credentials.
cred | The security credentials. |
Reimplemented from dmlite::Authn.
void dmlite::BuiltInAuthn::deleteGroup | ( | const std::string & | groupName | ) | throw (DmException) [virtual] |
void dmlite::BuiltInAuthn::deleteUser | ( | const std::string & | userName | ) | throw (DmException) [virtual] |
GroupInfo dmlite::BuiltInAuthn::getGroup | ( | const std::string & | key, | |
const boost::any & | value | |||
) | throw (DmException) [virtual] |
Get a specific group using an alternative key.
key | The key name. | |
value | They value to search for. |
Reimplemented from dmlite::Authn.
GroupInfo dmlite::BuiltInAuthn::getGroup | ( | const std::string & | groupName | ) | throw (DmException) [virtual] |
Get a specific group.
groupName | The group name. |
Reimplemented from dmlite::Authn.
GroupInfo dmlite::BuiltInAuthn::getGroup | ( | gid_t | gid | ) | throw (DmException) |
std::vector<GroupInfo> dmlite::BuiltInAuthn::getGroups | ( | void | ) | throw (DmException) [virtual] |
void dmlite::BuiltInAuthn::getIdMap | ( | const std::string & | userName, | |
const std::vector< std::string > & | groupNames, | |||
UserInfo * | user, | |||
std::vector< GroupInfo > * | groups | |||
) | throw (DmException) [virtual] |
Get the mapping of a user/group. Additionaly, new users and groups MAY be created by the implementation.
userName | The user name. | |
groupNames | The different groups. Can be empty. | |
user | Pointer to an UserInfo struct where to put the data. | |
groups | Pointer to a vector where the group mapping will be put. |
Reimplemented from dmlite::Authn.
std::string dmlite::BuiltInAuthn::getImplId | ( | void | ) | const throw () [virtual] |
UserInfo dmlite::BuiltInAuthn::getUser | ( | const std::string & | key, | |
const boost::any & | value | |||
) | throw (DmException) [virtual] |
Get a specific user using an alternative key.
key | The key name. | |
value | They value to search for. |
Reimplemented from dmlite::Authn.
UserInfo dmlite::BuiltInAuthn::getUser | ( | const std::string & | userName, | |
gid_t * | group | |||
) | throw (DmException) |
UserInfo dmlite::BuiltInAuthn::getUser | ( | const std::string & | userName | ) | throw (DmException) [virtual] |
Get a specific user.
userName | The user name. |
Reimplemented from dmlite::Authn.
std::vector<UserInfo> dmlite::BuiltInAuthn::getUsers | ( | void | ) | throw (DmException) [virtual] |
GroupInfo dmlite::BuiltInAuthn::newGroup | ( | const std::string & | gname | ) | throw (DmException) [virtual] |
Create a new group.
groupName | The group name. |
Reimplemented from dmlite::Authn.
UserInfo dmlite::BuiltInAuthn::newUser | ( | const std::string & | uname | ) | throw (DmException) [virtual] |
Create a new user.
userName | The user name. |
Reimplemented from dmlite::Authn.
void dmlite::BuiltInAuthn::updateGroup | ( | const GroupInfo & | group | ) | throw (DmException) [virtual] |
Update group info. 'name' identify uniquely the group.
group | The group metadata to update. |
Reimplemented from dmlite::Authn.
void dmlite::BuiltInAuthn::updateUser | ( | const UserInfo & | user | ) | throw (DmException) [virtual] |
Update user info. 'name' identify uniquely the user.
user | The user metadata to update. |
Reimplemented from dmlite::Authn.
std::string dmlite::BuiltInAuthn::nobody_ [private] |
std::string dmlite::BuiltInAuthn::nogroup_ [private] |