dmlite::BuiltInAuthn Class Reference

#include <Authn.h>

Inherits dmlite::Authn.

Collaboration diagram for dmlite::BuiltInAuthn:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BuiltInAuthn (const std::string &)
 ~BuiltInAuthn ()
std::string getImplId (void) const throw ()
 String ID of the user DB implementation.
SecurityContextcreateSecurityContext (const SecurityCredentials &cred) 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< GroupInfogetGroups (void) throw (DmException)
 Get the group list.
std::vector< UserInfogetUsers (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_

Constructor & Destructor Documentation

BuiltInAuthn::BuiltInAuthn ( const std::string &  nb  ) 
BuiltInAuthn::~BuiltInAuthn (  ) 

Member Function Documentation

SecurityContext * BuiltInAuthn::createSecurityContext ( const SecurityCredentials cred  )  throw (DmException) [virtual]

Create a security context from the credentials.

Parameters:
cred The security credentials.
Returns:
A newly created SecurityContext.

Implements dmlite::Authn.

void BuiltInAuthn::deleteGroup ( const std::string &  groupName  )  throw (DmException) [virtual]

Delete a group.

Implements dmlite::Authn.

void BuiltInAuthn::deleteUser ( const std::string &  userName  )  throw (DmException) [virtual]

Delete a user.

Implements dmlite::Authn.

GroupInfo BuiltInAuthn::getGroup ( const std::string &  key,
const boost::any &  value 
) throw (DmException) [virtual]

Get a specific group using an alternative key.

Parameters:
key The key name.
value They value to search for.
Returns:
The group.
Note:
The implementation will throw an exception if the field can not be used as key.

Implements dmlite::Authn.

GroupInfo BuiltInAuthn::getGroup ( const std::string &  groupName  )  throw (DmException) [virtual]

Get a specific group.

Parameters:
groupName The group name.
Returns:
The group.

Implements dmlite::Authn.

GroupInfo BuiltInAuthn::getGroup ( gid_t  gid  )  throw (DmException)
std::vector< GroupInfo > BuiltInAuthn::getGroups ( void   )  throw (DmException) [virtual]

Get the group list.

Implements dmlite::Authn.

void 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.

Parameters:
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.
Note:
If groupNames is empty, grid mapfile will be used to retrieve the default group.

Implements dmlite::Authn.

std::string BuiltInAuthn::getImplId ( void   )  const throw () [virtual]

String ID of the user DB implementation.

Implements dmlite::Authn.

UserInfo BuiltInAuthn::getUser ( const std::string &  key,
const boost::any &  value 
) throw (DmException) [virtual]

Get a specific user using an alternative key.

Parameters:
key The key name.
value They value to search for.
Returns:
The user.
Note:
The implementation will throw an exception if the field can not be used as key.

Implements dmlite::Authn.

UserInfo BuiltInAuthn::getUser ( const std::string &  userName,
gid_t *  group 
) throw (DmException)
UserInfo BuiltInAuthn::getUser ( const std::string &  userName  )  throw (DmException) [virtual]

Get a specific user.

Parameters:
userName The user name.
Returns:
The user.

Implements dmlite::Authn.

std::vector< UserInfo > BuiltInAuthn::getUsers ( void   )  throw (DmException) [virtual]

Get the user list.

Implements dmlite::Authn.

GroupInfo BuiltInAuthn::newGroup ( const std::string &  groupName  )  throw (DmException) [virtual]

Create a new group.

Parameters:
groupName The group name.
Returns:
The new group.

Implements dmlite::Authn.

UserInfo BuiltInAuthn::newUser ( const std::string &  userName  )  throw (DmException) [virtual]

Create a new user.

Parameters:
userName The user name.
Returns:
The new user.

Implements dmlite::Authn.

void BuiltInAuthn::updateGroup ( const GroupInfo group  )  throw (DmException) [virtual]

Update group info. 'name' identify uniquely the group.

Parameters:
group The group metadata to update.

Implements dmlite::Authn.

void BuiltInAuthn::updateUser ( const UserInfo user  )  throw (DmException) [virtual]

Update user info. 'name' identify uniquely the user.

Parameters:
user The user metadata to update.

Implements dmlite::Authn.


Member Data Documentation

std::string dmlite::BuiltInAuthn::nobody_ [private]

The documentation for this class was generated from the following files:

Generated on 6 Mar 2013 for dmlite by  doxygen 1.6.1