org.italiangrid.voms.credential.impl
Class DefaultLoadCredentialsStrategy

java.lang.Object
  extended by org.italiangrid.voms.credential.impl.AbstractLoadCredentialsStrategy
      extended by org.italiangrid.voms.credential.impl.DefaultLoadCredentialsStrategy
All Implemented Interfaces:
LoadCredentialsStrategy, VOMSEnvironmentVariables

public class DefaultLoadCredentialsStrategy
extends AbstractLoadCredentialsStrategy

The default strategy used to load user credentials when no file is explicitly pointed out by the user of this API. Credentials are searched in the following places (in sequence):


Field Summary
static String HOME_PROPERTY
           
static String TMPDIR_PATH
           
static String TMPDIR_PROPERTY
           
 
Fields inherited from interface org.italiangrid.voms.credential.VOMSEnvironmentVariables
PKCS12_USER_CERT, VOMS_USER_ID, X509_CERT_DIR, X509_USER_CERT, X509_USER_KEY, X509_USER_PROXY, X509_VOMS_DIR
 
Constructor Summary
DefaultLoadCredentialsStrategy()
           
DefaultLoadCredentialsStrategy(LoadCredentialsEventListener listener)
           
DefaultLoadCredentialsStrategy(String homeFolder)
           
DefaultLoadCredentialsStrategy(String homeFolder, String tempDir, LoadCredentialsEventListener listener)
           
 
Method Summary
 String getFromEnvOrSystemProperty(String propName)
          Looks for the value of a given property in the environment or in the system properties
 eu.emi.security.authn.x509.X509Credential loadCredentials(org.bouncycastle.openssl.PasswordFinder pf)
          Loads a user credential
protected  eu.emi.security.authn.x509.X509Credential loadPEMCredentialFromEnv(org.bouncycastle.openssl.PasswordFinder pf)
           
protected  eu.emi.security.authn.x509.X509Credential loadPEMCredentialsFromGlobusDir(org.bouncycastle.openssl.PasswordFinder pf)
           
protected  eu.emi.security.authn.x509.X509Credential loadPKCS12CredentialFromEnv(org.bouncycastle.openssl.PasswordFinder pf)
           
protected  eu.emi.security.authn.x509.X509Credential loadPKCS12CredentialsFromGlobusDir(org.bouncycastle.openssl.PasswordFinder pf)
           
protected  eu.emi.security.authn.x509.X509Credential loadProxyFromEnv()
           
protected  eu.emi.security.authn.x509.X509Credential loadProxyFromUID()
           
 
Methods inherited from class org.italiangrid.voms.credential.impl.AbstractLoadCredentialsStrategy
fileExistsAndIsReadable, loadPEMCredential, loadPKCS12Credential, loadProxyCredential
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOME_PROPERTY

public static final String HOME_PROPERTY
See Also:
Constant Field Values

TMPDIR_PROPERTY

public static final String TMPDIR_PROPERTY
See Also:
Constant Field Values

TMPDIR_PATH

public static final String TMPDIR_PATH
See Also:
Constant Field Values
Constructor Detail

DefaultLoadCredentialsStrategy

public DefaultLoadCredentialsStrategy(String homeFolder,
                                      String tempDir,
                                      LoadCredentialsEventListener listener)

DefaultLoadCredentialsStrategy

public DefaultLoadCredentialsStrategy(String homeFolder)

DefaultLoadCredentialsStrategy

public DefaultLoadCredentialsStrategy()

DefaultLoadCredentialsStrategy

public DefaultLoadCredentialsStrategy(LoadCredentialsEventListener listener)
Method Detail

getFromEnvOrSystemProperty

public String getFromEnvOrSystemProperty(String propName)
Looks for the value of a given property in the environment or in the system properties

Parameters:
propName - the property that will be looked for
Returns:
the property value, or null if no property was found

loadCredentials

public eu.emi.security.authn.x509.X509Credential loadCredentials(org.bouncycastle.openssl.PasswordFinder pf)
Description copied from interface: LoadCredentialsStrategy
Loads a user credential

Parameters:
pf - the password finder used to potentially decrypt the credential encrypted private key.
Returns:
an X509Credential, or null if no credential was found

loadProxyFromUID

protected eu.emi.security.authn.x509.X509Credential loadProxyFromUID()

loadProxyFromEnv

protected eu.emi.security.authn.x509.X509Credential loadProxyFromEnv()

loadPEMCredentialFromEnv

protected eu.emi.security.authn.x509.X509Credential loadPEMCredentialFromEnv(org.bouncycastle.openssl.PasswordFinder pf)

loadPKCS12CredentialFromEnv

protected eu.emi.security.authn.x509.X509Credential loadPKCS12CredentialFromEnv(org.bouncycastle.openssl.PasswordFinder pf)

loadPKCS12CredentialsFromGlobusDir

protected eu.emi.security.authn.x509.X509Credential loadPKCS12CredentialsFromGlobusDir(org.bouncycastle.openssl.PasswordFinder pf)

loadPEMCredentialsFromGlobusDir

protected eu.emi.security.authn.x509.X509Credential loadPEMCredentialsFromGlobusDir(org.bouncycastle.openssl.PasswordFinder pf)


Copyright © 2013. All Rights Reserved.