public abstract class MyProxyDelegationServlet extends EnvServlet implements TransactionFilter
Created by Jeff Gaynor
on May 17, 2011 at 3:46:53 PM
Modifier and Type | Field and Description |
---|---|
static AbstractCLIApprover.ClientApprovalThread |
caThread |
static String |
ERROR_NOTIFICATION_BODY_KEY
Servlet context key that points to the fully qualified file which contains the message
body to be used in cases of server-side exceptions.
|
static String |
ERROR_NOTIFICATION_SUBJECT_KEY
Servlet context key that points to the fully qualified file which contains the message
subject to be used in cases of server-side exceptions.
|
static KeyPairPopulationThread |
kpt |
static Cache |
myproxyConnectionCache |
static Cleanup<Identifier,CachedObject> |
myproxyConnectionCleanup |
static Cleanup<String,BasicTransaction> |
transactionCleanup |
storeUpdatesDone
environment, initialization, PING_PARAMETER
Constructor and Description |
---|
MyProxyDelegationServlet() |
Modifier and Type | Method and Description |
---|---|
static void |
addNotificationListener(NotificationListener notificationListener) |
void |
checkClientApproval(Client client)
Checks if the client is approved.
|
void |
destroy() |
AGIssuer |
getAGI() |
protected ATIssuer |
getATI() |
protected Client |
getClient(AuthorizationGrant authorizationGrant)
A utility to get the client from the authorization grant.
|
Client |
getClient(javax.servlet.http.HttpServletRequest req)
Assumes that the client identifier is a parameter in the request.
|
Client |
getClient(Identifier identifier) |
protected Map<String,String> |
getFirstParameters(javax.servlet.http.HttpServletRequest req)
Utility to extract all of the parameters from a request.
|
protected Identifier |
getGrantIDFromRequest(javax.servlet.http.HttpServletRequest req) |
protected MyProxyConnectable |
getMPConnection(Identifier identifier) |
protected MyProxyConnectable |
getMPConnection(ServiceTransaction transaction) |
static Cache |
getMyproxyConnectionCache() |
static List<MyProxyServiceFacade> |
getMyproxyServices() |
static ServiceEnvironment |
getServiceEnvironment() |
protected ServiceTransaction |
getTransaction(AuthorizationGrant grant) |
protected ServiceTransaction |
getTransactionByGrantID(javax.servlet.http.HttpServletRequest request) |
TransactionStore |
getTransactionStore() |
protected boolean |
hasMPConnection(Identifier identifier) |
protected boolean |
hasMPConnection(ServiceTransaction transaction) |
protected boolean |
isEmpty(String x) |
ServiceEnvironmentImpl |
loadProperties2() |
ServiceTransaction |
newTransaction() |
void |
postprocess(TransactionState state)
Invoked after the response has been written to the
HttpServletResponse
stream. |
void |
preprocess(TransactionState state)
Note that if you override this, you should call super, which sets some security-related headers, but touches nothing else.
|
protected void |
realStoreUpdates()
If you have store updates that need to get done, put them in this method,
invoking super.
|
static boolean |
removeNotificationListener(NotificationListener notificationListener) |
void |
say(String x)
Just for low-level debugging.
|
protected void |
shutdownCleanup(Cleanup c) |
void |
storeUpdates()
This will be invoked at init before anything else and should include code to seamlessly upgrade stores from earlier versions.
|
abstract ServiceTransaction |
verifyAndGet(IssuerResponse iResponse)
This is called after the response is received so that the system can get the approproate
transaction.
|
loadEnvironment, processStoreCheck
CONST, debug, doGet, doIt, doPing, doPost, error, getConfigurationLoader, getEnvironment, getExceptionHandler, getFirstParameterValue, getInitialization, getMyLogger, handleException, info, init, isDebugOn, printAllParameters, resetState, setConfigurationLoader, setDebugOn, setEnvironment, setExceptionHandler, setInitialization, warn
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public static final String ERROR_NOTIFICATION_BODY_KEY
public static final String ERROR_NOTIFICATION_SUBJECT_KEY
public static Cleanup<String,BasicTransaction> transactionCleanup
public static Cleanup<Identifier,CachedObject> myproxyConnectionCleanup
public static Cache myproxyConnectionCache
public static KeyPairPopulationThread kpt
public static AbstractCLIApprover.ClientApprovalThread caThread
public abstract ServiceTransaction verifyAndGet(IssuerResponse iResponse) throws IOException
iResponse@return
- IOException
public static void addNotificationListener(NotificationListener notificationListener)
public static boolean removeNotificationListener(NotificationListener notificationListener)
public ServiceEnvironmentImpl loadProperties2() throws IOException
loadProperties2
in class EnvServlet
IOException
public static Cache getMyproxyConnectionCache()
public AGIssuer getAGI() throws IOException
IOException
protected ATIssuer getATI() throws IOException
IOException
public static ServiceEnvironment getServiceEnvironment()
public static List<MyProxyServiceFacade> getMyproxyServices()
public void storeUpdates() throws IOException, SQLException
EnvServlet
EnvServlet.storeUpdatesDone
which should be
checks in overrides. If you override this method and call super, let super manage this flag. If it is true, do not
execute your method.storeUpdates
in class EnvServlet
IOException
SQLException
protected void realStoreUpdates() throws IOException, SQLException
IOException
SQLException
protected void shutdownCleanup(Cleanup c)
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public TransactionStore getTransactionStore() throws IOException
IOException
public Client getClient(javax.servlet.http.HttpServletRequest req)
req
- protected ServiceTransaction getTransactionByGrantID(javax.servlet.http.HttpServletRequest request) throws IOException
IOException
protected Identifier getGrantIDFromRequest(javax.servlet.http.HttpServletRequest req)
public Client getClient(Identifier identifier)
public ServiceTransaction newTransaction() throws IOException
IOException
protected ServiceTransaction getTransaction(AuthorizationGrant grant) throws IOException
IOException
protected Client getClient(AuthorizationGrant authorizationGrant) throws IOException
authorizationGrant
- IOException
public void checkClientApproval(Client client)
client
- protected boolean isEmpty(String x)
public void preprocess(TransactionState state) throws Throwable
preprocess
in interface TransactionFilter
state
- Throwable
public void postprocess(TransactionState state) throws Throwable
TransactionFilter
HttpServletResponse
stream. This is the very last call made by the servlet before returning.postprocess
in interface TransactionFilter
Throwable
protected boolean hasMPConnection(Identifier identifier)
protected boolean hasMPConnection(ServiceTransaction transaction)
protected MyProxyConnectable getMPConnection(ServiceTransaction transaction)
protected MyProxyConnectable getMPConnection(Identifier identifier)
protected Map<String,String> getFirstParameters(javax.servlet.http.HttpServletRequest req)
req
- public void say(String x)
x
- Copyright © 2019. All Rights Reserved.