dmlite  0.4
Public Member Functions | Private Attributes | List of all members
dmlite::BuiltInAuthn Class Reference

#include <Authn.h>

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

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)
- Public Member Functions inherited from dmlite::Authn
virtual ~Authn ()
 Destructor.

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
credThe 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 ( gid_t  gid) throw (DmException)
GroupInfo BuiltInAuthn::getGroup ( const std::string &  groupName) throw (DmException)
virtual

Get a specific group.

Parameters
groupNameThe group name.
Returns
The group.

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
keyThe key name.
valueThey 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.

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
userNameThe user name.
groupNamesThe different groups. Can be empty.
userPointer to an UserInfo struct where to put the data.
groupsPointer 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 &  userName) throw (DmException)
virtual

Get a specific user.

Parameters
userNameThe user name.
Returns
The user.

Implements dmlite::Authn.

UserInfo BuiltInAuthn::getUser ( const std::string &  userName,
gid_t *  group 
) throw (DmException)
UserInfo BuiltInAuthn::getUser ( const std::string &  key,
const boost::any &  value 
) throw (DmException)
virtual

Get a specific user using an alternative key.

Parameters
keyThe key name.
valueThey 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.

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
groupNameThe group name.
Returns
The new group.

Implements dmlite::Authn.

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

Create a new user.

Parameters
userNameThe 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
groupThe 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
userThe 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: