public class RestAuthenticatedRequestHandler extends AuthenticatedRequestHandler
AuthenticatedRequestHandler for REST.
Uses a root URI like /private/ so that only request with URIs that have this root as prefix are
considered.
For example, an AuthenticatedRequestHandler with /private/ root handles a request to
/private/my/endpoint but not a request to /public/another/endpoint.
| Constructor and Description |
|---|
RestAuthenticatedRequestHandler(SessionAuthenticator authenticator,
java.lang.String root)
Constructs the REST request handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEndpoint(RestEndpoint endpoint)
Add an endpoint to this handler.
|
getRoot, getSessionID, match, onFailedAuthentication, onSuccessfulAuthentication, processaddRequestHandlerpublic RestAuthenticatedRequestHandler(SessionAuthenticator authenticator, java.lang.String root)
authenticator - the SessionAuthenticator used to authenticate users.root - the URI root used to match the request.public void addEndpoint(RestEndpoint endpoint)
root.endpoint - the RestEndpoint to add.java.lang.IllegalArgumentException - if the endpoint URI isn't prefixed by root.RestAuthenticatedRequestHandler(SessionAuthenticator, String)