dmlite  0.6
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 &, const std::string &)
 
 ~BuiltInAuthn ()
 
std::string getImplId (void) const throw ()
 String ID of the user DB implementation. More...
 
virtual SecurityContextcreateSecurityContext (const SecurityCredentials &cred)
 
virtual SecurityContextcreateSecurityContext ()
 
GroupInfo newGroup (const std::string &gname)
 
GroupInfo getGroup (gid_t gid)
 
GroupInfo getGroup (const std::string &groupName)
 
GroupInfo getGroup (const std::string &key, const boost::any &value)
 
void updateGroup (const GroupInfo &group)
 
void deleteGroup (const std::string &groupName)
 Delete a group. More...
 
UserInfo newUser (const std::string &uname)
 
UserInfo getUser (const std::string &userName)
 
UserInfo getUser (const std::string &userName, gid_t *group)
 
UserInfo getUser (const std::string &key, const boost::any &value)
 
void updateUser (const UserInfo &user)
 
void deleteUser (const std::string &userName)
 Delete a user. More...
 
std::vector< GroupInfogetGroups (void)
 Get the group list. More...
 
std::vector< UserInfogetUsers (void)
 Get the user list. More...
 
void getIdMap (const std::string &userName, const std::vector< std::string > &groupNames, UserInfo *user, std::vector< GroupInfo > *groups)
 
- Public Member Functions inherited from dmlite::Authn
virtual ~Authn ()
 Destructor. More...
 

Private Attributes

std::string nobody_
 
std::string nogroup_
 

Constructor & Destructor Documentation

dmlite::BuiltInAuthn::BuiltInAuthn ( const std::string &  ,
const std::string &   
)
dmlite::BuiltInAuthn::~BuiltInAuthn ( )

Member Function Documentation

virtual SecurityContext* dmlite::BuiltInAuthn::createSecurityContext ( const SecurityCredentials cred)
virtual

Create a security context from the credentials.

Parameters
credThe security credentials.
Returns
A newly created SecurityContext.

Reimplemented from dmlite::Authn.

virtual SecurityContext* dmlite::BuiltInAuthn::createSecurityContext ( )
virtual

Create a default security context.

Returns
A newly created SecurityContext.

Reimplemented from dmlite::Authn.

void dmlite::BuiltInAuthn::deleteGroup ( const std::string &  groupName)
virtual

Delete a group.

Reimplemented from dmlite::Authn.

void dmlite::BuiltInAuthn::deleteUser ( const std::string &  userName)
virtual

Delete a user.

Reimplemented from dmlite::Authn.

GroupInfo dmlite::BuiltInAuthn::getGroup ( gid_t  gid)
GroupInfo dmlite::BuiltInAuthn::getGroup ( const std::string &  groupName)
virtual

Get a specific group.

Parameters
groupNameThe group name.
Returns
The group.

Reimplemented from dmlite::Authn.

GroupInfo dmlite::BuiltInAuthn::getGroup ( const std::string &  key,
const boost::any &  value 
)
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.

Reimplemented from dmlite::Authn.

std::vector<GroupInfo> dmlite::BuiltInAuthn::getGroups ( void  )
virtual

Get the group list.

Reimplemented from dmlite::Authn.

void dmlite::BuiltInAuthn::getIdMap ( const std::string &  userName,
const std::vector< std::string > &  groupNames,
UserInfo user,
std::vector< GroupInfo > *  groups 
)
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.

Reimplemented from dmlite::Authn.

std::string dmlite::BuiltInAuthn::getImplId ( void  ) const
throw (
)
virtual

String ID of the user DB implementation.

Implements dmlite::Authn.

UserInfo dmlite::BuiltInAuthn::getUser ( const std::string &  userName)
virtual

Get a specific user.

Parameters
userNameThe user name.
Returns
The user.

Reimplemented from dmlite::Authn.

UserInfo dmlite::BuiltInAuthn::getUser ( const std::string &  userName,
gid_t *  group 
)
UserInfo dmlite::BuiltInAuthn::getUser ( const std::string &  key,
const boost::any &  value 
)
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.

Reimplemented from dmlite::Authn.

std::vector<UserInfo> dmlite::BuiltInAuthn::getUsers ( void  )
virtual

Get the user list.

Reimplemented from dmlite::Authn.

GroupInfo dmlite::BuiltInAuthn::newGroup ( const std::string &  groupName)
virtual

Create a new group.

Parameters
groupNameThe group name.
Returns
The new group.

Reimplemented from dmlite::Authn.

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

Create a new user.

Parameters
userNameThe user name.
Returns
The new user.

Reimplemented from dmlite::Authn.

void dmlite::BuiltInAuthn::updateGroup ( const GroupInfo group)
virtual

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

Parameters
groupThe group metadata to update.

Reimplemented from dmlite::Authn.

void dmlite::BuiltInAuthn::updateUser ( const UserInfo user)
virtual

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

Parameters
userThe user metadata to update.

Reimplemented from dmlite::Authn.

Member Data Documentation

std::string dmlite::BuiltInAuthn::nobody_
private
std::string dmlite::BuiltInAuthn::nogroup_
private

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