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 &, const std::string &)
 ~BuiltInAuthn ()
std::string getImplId (void) const throw ()
 String ID of the user DB implementation.
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.
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.
std::vector< GroupInfogetGroups (void)
 Get the group list.
std::vector< UserInfogetUsers (void)
 Get the user list.
void getIdMap (const std::string &userName, const std::vector< std::string > &groupNames, UserInfo *user, std::vector< GroupInfo > *groups)

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 (  )  [virtual]

Create a default security context.

Returns:
A newly created SecurityContext.

Reimplemented from dmlite::Authn.

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

Create a security context from the credentials.

Parameters:
cred The security credentials.
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 ( const std::string &  key,
const boost::any &  value 
) [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.

Reimplemented from dmlite::Authn.

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

Get a specific group.

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

Reimplemented from dmlite::Authn.

GroupInfo dmlite::BuiltInAuthn::getGroup ( gid_t  gid  ) 
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:
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.

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 &  key,
const boost::any &  value 
) [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.

Reimplemented from dmlite::Authn.

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

Get a specific user.

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

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

Reimplemented from dmlite::Authn.

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

Create a new user.

Parameters:
userName The 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:
group The 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:
user The 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:

Generated on 5 Nov 2020 for dmlite by  doxygen 1.6.1