|
def | __init__ (self, host, *args, **kwargs) |
|
Class to authenticate via Grid Certificate
Definition at line 26 of file authentication.py.
◆ __init__()
def authentication.X509CertAuth.__init__ |
( |
|
self, |
|
|
|
host, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
Definition at line 28 of file authentication.py.
28 def __init__(self, host, *args, **kwargs):
32 x509_path = getenv(
"X509_USER_PROXY",
None)
33 if x509_path
and exists(x509_path):
34 key_file = cert_file = x509_path
37 x509_path = getenv(
"X509_USER_KEY",
None)
38 if x509_path
and exists(x509_path):
42 x509_path = getenv(
"X509_USER_CERT",
None)
43 if x509_path
and exists(x509_path):
47 x509_path = getenv(
"HOME") +
"/.globus/userkey.pem"
52 x509_path = getenv(
"HOME") +
"/.globus/usercert.pem"
56 if not key_file
or not exists(key_file):
57 print(
"No certificate private key file found", file=stderr)
60 if not cert_file
or not exists(cert_file):
61 print(
"No certificate public key file found", file=stderr)
67 HTTPSConnection.__init__(self,
70 cert_file = cert_file,
References beamvalidation.exit(), and edm.print().