Interface HasDynamicAuthorization
-
- All Known Implementing Classes:
HttpServletBase
public interface HasDynamicAuthorization
Optional interface implemented byHttpServlet
s which need to dynamically determine whatAuthorizationConstraint
is required for a request.- Author:
- cdivilly
-
-
Field Summary
Fields Modifier and Type Field Description static AuthorizationConstraint
USE_DEFAULT_CONSTRAINTS
Constant denoting that the runtime's default logic for discovering whatAuthorizationConstraint
to apply to a request should be used.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthorizationConstraint
getConstraint(javax.servlet.http.HttpServletRequest request)
Determine theAuthorizationConstraint
that applies to a resource.
-
-
-
Field Detail
-
USE_DEFAULT_CONSTRAINTS
static final AuthorizationConstraint USE_DEFAULT_CONSTRAINTS
Constant denoting that the runtime's default logic for discovering whatAuthorizationConstraint
to apply to a request should be used.
-
-
Method Detail
-
getConstraint
AuthorizationConstraint getConstraint(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, java.io.IOException
Determine theAuthorizationConstraint
that applies to a resource.- Parameters:
request
- anHttpServletRequest
object that contains the request the client has made of the servlet- Returns:
AuthorizationConstraint
instance if a constraint applies to the request.null
if no constraint applies to the request.USE_DEFAULT_CONSTRAINTS
if this method cannot determine what constraint applies to the request, and therefore the runtime's defaultAuthorizationConstraint
discovery logic will be applied to the request.- Throws:
java.io.IOException
- if an input or output error is detected when the servlet determines theAuthorizationConstraint
javax.servlet.ServletException
- if the request for the dynamic privilege could not be handled
-
-