public class PortalCertificateManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
PortalCertificateManager() |
PortalCertificateManager(String configFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeLoggers()
To prevent .lck files from persisting, we close the loggers when shutting down the system
http://stackoverflow.com/questions/2723280/why-is-my-program-creating-empty-lck-files
|
X509Certificate |
getCertificate(javax.servlet.http.HttpServletRequest request)
Get the certificate from the store, based on the cookie (if present)
|
String |
getConfigFile()
Gets the current configuration file path
|
javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest httpServletRequest)
Retrieves the certificate Cookie from the request
|
edu.uiuc.ncsa.myproxy.oa4mp.client.Asset |
getCredentials(javax.servlet.http.HttpServletRequest request)
Get the credentials from the store, based on the cookie (if present)
|
edu.uiuc.ncsa.myproxy.oa4mp.client.Asset |
getCredentials(String identifier)
Get the credentials from the store, based on the token/identifier
|
static PortalCertificateManager |
getInstance() |
PrivateKey |
getPrivateKey(javax.servlet.http.HttpServletRequest request)
Get the private key from the store, based on the cookie (if present)
|
org.dataone.service.types.v1.Session |
getSession(javax.servlet.http.HttpServletRequest request)
Gets the requests Session, either the X509 Certificate if there is one,
or by checking for Authorization headers.
|
org.dataone.service.types.v1.Session |
putPortalCertificateOnRequest(javax.servlet.http.HttpServletRequest request) |
org.dataone.service.types.v1.Session |
registerPortalCertificateAndPlaceOnRequest(javax.servlet.http.HttpServletRequest request) |
void |
registerPortalCertificateWithCertificateManger(javax.servlet.http.HttpServletRequest request) |
void |
removeCookie(javax.servlet.http.HttpServletResponse httpServletResponse)
Removes the certificate cookie, essentially logging out the user
|
void |
setConfigFile(String configFile)
Sets the client configuration file path
|
void |
setCookie(String identifier,
javax.servlet.http.HttpServletResponse httpServletResponse)
Sets the certificate Cookie on the response.
|
public PortalCertificateManager()
public PortalCertificateManager(String configFile)
public static PortalCertificateManager getInstance()
public void closeLoggers()
throws Exception
Exceptionpublic String getConfigFile()
public void setConfigFile(String configFile)
configFile - public void setCookie(String identifier, javax.servlet.http.HttpServletResponse httpServletResponse)
identifier - httpServletResponse - public javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - public void removeCookie(javax.servlet.http.HttpServletResponse httpServletResponse)
httpServletResponse - public X509Certificate getCertificate(javax.servlet.http.HttpServletRequest request) throws Exception
request - IOExceptionExceptionpublic PrivateKey getPrivateKey(javax.servlet.http.HttpServletRequest request) throws Exception
request - IOExceptionExceptionpublic edu.uiuc.ncsa.myproxy.oa4mp.client.Asset getCredentials(String identifier) throws Exception
identifier - for the certificate/credentialIOExceptionExceptionpublic edu.uiuc.ncsa.myproxy.oa4mp.client.Asset getCredentials(javax.servlet.http.HttpServletRequest request)
throws Exception
request - IOExceptionExceptionpublic org.dataone.service.types.v1.Session putPortalCertificateOnRequest(javax.servlet.http.HttpServletRequest request)
throws Exception
Exceptionpublic void registerPortalCertificateWithCertificateManger(javax.servlet.http.HttpServletRequest request)
throws Exception
Exceptionpublic org.dataone.service.types.v1.Session registerPortalCertificateAndPlaceOnRequest(javax.servlet.http.HttpServletRequest request)
throws Exception
Exceptionpublic org.dataone.service.types.v1.Session getSession(javax.servlet.http.HttpServletRequest request)
request - Copyright © 2024. All rights reserved.