Authn.h

Go to the documentation of this file.
00001 /// @file    core/builtin/Authn.h
00002 /// @brief   User and group mapping using the system's ones.
00003 /// @details This will be used by default when no other Authn
00004 ///          implementeation is loaded.
00005 /// @author  Alejandro Álvarez Ayllon <aalvarez@cern.ch>
00006 #ifndef BUILTIN_AUTHN_H
00007 #define BUILTIN_AUTHN_H
00008 
00009 #include <dmlite/cpp/authn.h>
00010 
00011 namespace dmlite {
00012   
00013   class BuiltInAuthn: public Authn {
00014    public:
00015     BuiltInAuthn(const std::string&);
00016     ~BuiltInAuthn();
00017 
00018     std::string getImplId(void) const throw();
00019 
00020     SecurityContext* createSecurityContext(const SecurityCredentials& cred) throw (DmException);
00021 
00022     GroupInfo newGroup   (const std::string& gname) throw (DmException);
00023     GroupInfo getGroup   (gid_t gid) throw (DmException);
00024     GroupInfo getGroup   (const std::string& groupName) throw (DmException);
00025     GroupInfo getGroup   (const std::string& key,
00026                           const boost::any& value) throw (DmException);
00027     void      updateGroup(const GroupInfo& group) throw (DmException);
00028     void      deleteGroup(const std::string& groupName) throw (DmException);
00029 
00030     UserInfo newUser   (const std::string& uname)    throw (DmException);
00031     UserInfo getUser   (const std::string& userName) throw (DmException);
00032     UserInfo getUser   (const std::string& userName,
00033                         gid_t* group) throw (DmException);
00034     UserInfo getUser   (const std::string& key,
00035                         const boost::any& value) throw (DmException);
00036     void     updateUser(const UserInfo& user) throw (DmException);
00037     void     deleteUser(const std::string& userName) throw (DmException);
00038     
00039     std::vector<GroupInfo> getGroups(void) throw (DmException);
00040     std::vector<UserInfo>  getUsers (void) throw (DmException);
00041 
00042     void getIdMap(const std::string& userName,
00043                   const std::vector<std::string>& groupNames,
00044                   UserInfo* user,
00045                   std::vector<GroupInfo>* groups) throw (DmException);
00046    private:
00047     std::string nobody_;
00048   };
00049 
00050   class BuiltInAuthnFactory: public AuthnFactory {
00051    public:
00052     BuiltInAuthnFactory();
00053     ~BuiltInAuthnFactory();
00054 
00055     void configure(const std::string& key, const std::string& value) throw (DmException);
00056 
00057     Authn* createAuthn(PluginManager* pm) throw (DmException);
00058     
00059    private:
00060     std::string nobody_;
00061   };
00062   
00063 };
00064 
00065 #endif  // BUILTIN_AUTHN_H

Generated on 3 Mar 2013 for dmlite by  doxygen 1.4.7