Interface HasDynamicAuthorization
- All Known Implementing Classes:
HttpServletBase
public interface HasDynamicAuthorization
Optional interface implemented by
HttpServlets which need to
dynamically determine what AuthorizationConstraint is required for a
request.- Author:
- cdivilly
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AuthorizationConstraintConstant denoting that the runtime's default logic for discovering whatAuthorizationConstraintto apply to a request should be used. -
Method Summary
Modifier and TypeMethodDescriptiongetConstraint(javax.servlet.http.HttpServletRequest request) Determine theAuthorizationConstraintthat applies to a resource.
-
Field Details
-
USE_DEFAULT_CONSTRAINTS
Constant denoting that the runtime's default logic for discovering whatAuthorizationConstraintto apply to a request should be used.
-
-
Method Details
-
getConstraint
AuthorizationConstraint getConstraint(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, IOException Determine theAuthorizationConstraintthat applies to a resource.- Parameters:
request- anHttpServletRequestobject that contains the request the client has made of the servlet- Returns:
AuthorizationConstraintinstance if a constraint applies to the request.nullif no constraint applies to the request.USE_DEFAULT_CONSTRAINTSif this method cannot determine what constraint applies to the request, and therefore the runtime's defaultAuthorizationConstraintdiscovery logic will be applied to the request.- Throws:
IOException- if an input or output error is detected when the servlet determines theAuthorizationConstraintjavax.servlet.ServletException- if the request for the dynamic privilege could not be handled
-