Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

UserCredential Class Reference

The UserCredential class provides methods that allow getting information about the user credentials. Allow getting information about the user credentials. More...

List of all members.

Public Member Functions

 UserCredential ()
 Empty Constructor.

int checkProxy (const std::string &cred_path="")
 Check if the Proxy Certificate is valid.

std::string getIssuer (const std::string &cred_path="")
 Return the Issuer of the Proxy Certificate.

std::string getSubject (const std::string &cred_path="")
 Return the Issuer of the Proxy Certificate.

int getCredType (const std::string &cred_path="")
 Return the Subject of the Proxy Certificate.

int getStrenght (const std::string &cred_path="")
 Return the Cred type of the Proxy Certificate.

int getTimeLeft (const std::string &cred_path="")
 Return the Strenght of the Proxy Certificate.

void getInfo (std::string &subj, std::string &issuer, int &cred_type, int &strength, int &time_left, const std::string &cred_path="")
 Return the lasting time of the Proxy Certificate.

void destroy (const std::string &cred_path="")
 Destroy the proxy file (if present).

std::string getDefaultVoName ()
 Retrieve the default Virtual Organisation name.

std::vector< std::string > getVoNames ()
 Retrieve the vector of all the Virtual Organisation names.

std::vector< std::string > getGroups (const std::string &voName)
std::vector< std::string > getDefaultGroups ()
 Returns the groups belonging to the default VirtualOrganisation.

bool containsVo (const std::string &voName)
 Check wheater the specifie Virtual Organisation is contained in the Vo certificate extension.


Detailed Description

The UserCredential class provides methods that allow getting information about the user credentials. Allow getting information about the user credentials.

It does not allow the creation of proxy certificates that have to be generated by using the grid-proxy-init Globus command (the only way of handling credentials that is considered really safe). Namely this is needed since the pass-phrase (very sensitive information) should not be passed through any complex (hence likely to be insecure) software components like GUI. It is recalled that proxy existence and correct setting of the X509* variables is required by all job monitoring and control methods.

This class can manipulate standard proxies as well as edg-VOMS certificates, in order to extract the extension information The main operation are:

Version:
0.1
Date:
15 April 2002
Author:
Alessandro Maraschini <alessandro.maraschini@datamat.it>


Constructor & Destructor Documentation

UserCredential  )  [inline]
 

Empty Constructor.


Member Function Documentation

int checkProxy const std::string &  cred_path = ""  ) 
 

Check if the Proxy Certificate is valid.

Parameters:
cred_path the whole path of the proxy Certificate (if different from the default one)
Exceptions:
ProxyException The proxy certificate is not valid
CredProxyException Unable to get the proxy certificate

bool containsVo const std::string &  voName  ) 
 

Check wheater the specifie Virtual Organisation is contained in the Vo certificate extension.

Returns:
true if the VoName is present, false otherwise

void destroy const std::string &  cred_path = ""  ) 
 

Destroy the proxy file (if present).

Parameters:
cred_path the whole path of the proxy Certificate (if different from the default one)

int getCredType const std::string &  cred_path = ""  ) 
 

Return the Subject of the Proxy Certificate.

Parameters:
cred_path the whole path of the proxy Certificate (if different from the default one)
Exceptions:
CredProxyException Unable to get the proxy certificate

std::vector<std::string > getDefaultGroups  ) 
 

Returns the groups belonging to the default VirtualOrganisation.

std::string getDefaultVoName  ) 
 

Retrieve the default Virtual Organisation name.

std::vector<std::string> getGroups const std::string &  voName  ) 
 

void getInfo std::string &  subj,
std::string &  issuer,
int &  cred_type,
int &  strength,
int &  time_left,
const std::string &  cred_path = ""
 

Return the lasting time of the Proxy Certificate.

Parameters:
subj a std::string variable where the subject will be copied to
issuer a std::string variable where the issuer will be copied to
cred_type an int variable where the cred type will be copied to
strength an int variable where the strength will be copied to
time_left an int variable where the time left will be copied to
cred_path the whole path of the proxy Certificate (if different from the default one)
Exceptions:
CredProxyException Unable to get the proxy certificate

std::string getIssuer const std::string &  cred_path = ""  ) 
 

Return the Issuer of the Proxy Certificate.

Parameters:
cred_path the whole path of the proxy Certificate (if different from the default one)
Exceptions:
CredProxyException Unable to get the proxy certificate

int getStrenght const std::string &  cred_path = ""  ) 
 

Return the Cred type of the Proxy Certificate.

Parameters:
cred_path the whole path of the proxy Certificate (if different from the default one)
Exceptions:
CredProxyException Unable to get the proxy certificate

std::string getSubject const std::string &  cred_path = ""  ) 
 

Return the Issuer of the Proxy Certificate.

Parameters:
cred_path the whole path of the proxy Certificate (if different from the default one)
Exceptions:
CredProxyException Unable to get the proxy certificate

int getTimeLeft const std::string &  cred_path = ""  ) 
 

Return the Strenght of the Proxy Certificate.

Parameters:
cred_path the whole path of the proxy Certificate (if different from the default one)
Exceptions:
CredProxyException Unable to get the proxy certificate

std::vector<std::string> getVoNames  ) 
 

Retrieve the vector of all the Virtual Organisation names.


The documentation for this class was generated from the following file:
Generated on Wed Mar 1 00:39:46 2006 for USERINTERFACE C++ API by doxygen 1.3.5