dmlite  0.6
Public Member Functions | List of all members
dmlite::Authn Class Referenceabstract

#include <authn.h>

Inheritance diagram for dmlite::Authn:
Inheritance graph
[legend]

Public Member Functions

virtual ~Authn ()
 Destructor. More...
 
virtual std::string getImplId (void) const =0 throw ()
 String ID of the user DB implementation. More...
 
virtual SecurityContextcreateSecurityContext (const SecurityCredentials &cred)
 
virtual SecurityContextcreateSecurityContext (void)
 
virtual GroupInfo newGroup (const std::string &groupName)
 
virtual GroupInfo getGroup (const std::string &groupName)
 
virtual GroupInfo getGroup (const std::string &key, const boost::any &value)
 
virtual std::vector< GroupInfogetGroups (void)
 Get the group list. More...
 
virtual void updateGroup (const GroupInfo &group)
 
virtual void deleteGroup (const std::string &groupName)
 Delete a group. More...
 
virtual UserInfo newUser (const std::string &userName)
 
virtual UserInfo getUser (const std::string &userName)
 
virtual UserInfo getUser (const std::string &key, const boost::any &value)
 
virtual std::vector< UserInfogetUsers (void)
 Get the user list. More...
 
virtual void updateUser (const UserInfo &user)
 
virtual void deleteUser (const std::string &userName)
 Delete a user. More...
 
virtual void getIdMap (const std::string &userName, const std::vector< std::string > &groupNames, UserInfo *user, std::vector< GroupInfo > *groups)
 

Detailed Description

User and group handling.

Note
This is the only interface not inheriting from BaseInterface.

Constructor & Destructor Documentation

◆ ~Authn()

virtual dmlite::Authn::~Authn ( )
virtual

Destructor.

Member Function Documentation

◆ createSecurityContext() [1/2]

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

Create a security context from the credentials.

Parameters
credThe security credentials.
Returns
A newly created SecurityContext.

Reimplemented in dmlite::BuiltInAuthn.

◆ createSecurityContext() [2/2]

virtual SecurityContext* dmlite::Authn::createSecurityContext ( void  )
virtual

Create a default security context.

Returns
A newly created SecurityContext.

Reimplemented in dmlite::BuiltInAuthn.

◆ deleteGroup()

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

Delete a group.

Reimplemented in dmlite::BuiltInAuthn.

◆ deleteUser()

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

Delete a user.

Reimplemented in dmlite::BuiltInAuthn.

◆ getGroup() [1/2]

virtual GroupInfo dmlite::Authn::getGroup ( const std::string &  groupName)
virtual

Get a specific group.

Parameters
groupNameThe group name.
Returns
The group.

Reimplemented in dmlite::BuiltInAuthn.

◆ getGroup() [2/2]

virtual GroupInfo dmlite::Authn::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 in dmlite::BuiltInAuthn.

◆ getGroups()

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

Get the group list.

Reimplemented in dmlite::BuiltInAuthn.

◆ getIdMap()

virtual void dmlite::Authn::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 in dmlite::BuiltInAuthn.

◆ getImplId()

virtual std::string dmlite::Authn::getImplId ( void  ) const
throw (
)
pure virtual

String ID of the user DB implementation.

Implemented in dmlite::BuiltInAuthn.

◆ getUser() [1/2]

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

Get a specific user.

Parameters
userNameThe user name.
Returns
The user.

Reimplemented in dmlite::BuiltInAuthn.

◆ getUser() [2/2]

virtual UserInfo dmlite::Authn::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 in dmlite::BuiltInAuthn.

◆ getUsers()

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

Get the user list.

Reimplemented in dmlite::BuiltInAuthn.

◆ newGroup()

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

Create a new group.

Parameters
groupNameThe group name.
Returns
The new group.

Reimplemented in dmlite::BuiltInAuthn.

◆ newUser()

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

Create a new user.

Parameters
userNameThe user name.
Returns
The new user.

Reimplemented in dmlite::BuiltInAuthn.

◆ updateGroup()

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

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

Parameters
groupThe group metadata to update.

Reimplemented in dmlite::BuiltInAuthn.

◆ updateUser()

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

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

Parameters
userThe user metadata to update.

Reimplemented in dmlite::BuiltInAuthn.


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