Main Page   Class Hierarchy   Compound List   File List   Compound 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 Methods

 UserCredential ()
 Empty Constructor.

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

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

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

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

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

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

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. More...

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

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 > 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. More...


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>


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

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


The documentation for this class was generated from the following file:
Generated on Fri May 14 14:19:40 2004 for USERINTERFACE C++ API by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002