All methods default to calling the wrapped object.
| Modifier and Type | Field and Description |
|---|---|
| private final HttpMessageContext |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanClientSubject()
Implements javax. |
| public AuthenticationStatus | doNothing()
Implements javax. |
| public AuthenticationStatus | forward(String
a String specifying the pathname to the resource. path)Implements javax. |
| public AuthenticationParameters | getAuthParameters()
Implements javax. |
| public Principal | getCallerPrincipal()
Implements javax. |
| public Subject | getClientSubject()
Implements javax. |
| public Set | getGroups()
Implements javax. |
| public CallbackHandler | getHandler()
Implements javax. HttpMessageContext,
and which this context uses to communicate the authentication details to the runtime.
|
| public MessageInfo | getMessageInfo()
Implements javax. |
| public HttpServletRequest | getRequest()
Implements javax. |
| public HttpServletResponse | getResponse()
Implements javax. |
| public HttpMessageContext | |
| public boolean | isAuthenticationRequest()
Implements javax. SecurityContext#authenticate(HttpServletRequest, HttpServletResponse, AuthenticationParameters)
If SecurityContext#authenticate was not called, the authentication mechanism may have been invoked by the container at the start of a request. |
| public boolean | isProtected()
Implements javax. |
| public boolean | isRegisterSession()
Implements javax. |
| public AuthenticationStatus | notifyContainerAboutLogin(String
the caller name that will become the caller principal username, Set<String> the groups associated with the caller principal roles)Implements javax. SecurityContext#isCallerInRole(String) etc.
Note that after this call returned, the authenticated identity will not be immediately active. |
| public AuthenticationStatus | notifyContainerAboutLogin(Principal
the Principal that will become the caller principal principal, Set<String> the groups associated with the caller principal roles)Implements javax. SecurityContext#isCallerInRole(String) etc.
Note that this call may result in the container establishing two caller principals to represent the caller's identity -- the Principal provided here as the principal parameter, and a second principal used as the container's representation of the caller identity. |
| public AuthenticationStatus | notifyContainerAboutLogin(CredentialValidationResult
a CredentialValidationResult which is inspected for its status and from which the principal and groups
are taken. result)Implements javax. CredentialValidationResult result of an
identity store directly on to the container.
|
| public AuthenticationStatus | redirect(String
the location to redirect to location)Implements javax.
As a convenience this method returns SEND_CONTINUE, so this method can be used in
one fluent return statement from an |
| public AuthenticationStatus | responseNotFound()
Implements javax. |
| public AuthenticationStatus | responseUnauthorized()
Implements javax. |
| public void | setRegisterSession(String
the caller name for which authentication should be be remembered callerName, Set<String> the groups for which authentication should be remembered. groups)Implements javax. |
| public void | setRequest(HttpServletRequest
the request object to be set request)Implements javax. |
| public void | setResponse(HttpServletResponse
the response object to be set. response)Implements javax. |
| public HttpMessageContext | withRequest(HttpServletRequest
the request object to be set. request)Implements javax. |
| httpMessageContext | back to summary |
|---|---|
| private final HttpMessageContext httpMessageContext | |
| HttpMessageContextWrapper | back to summary |
|---|---|
| public HttpMessageContextWrapper(HttpMessageContext httpMessageContext) | |
| cleanClientSubject | back to summary |
|---|---|
| public void cleanClientSubject() Implements javax. Doc from javax. Convenience method to clean the subject associated with this context.
Cleaning this subject is done as defined by the Servlet Container Profile of JASPIC
(JSR 196) for the ServerAuthModule#cleanSubject method and the
| |
| doNothing | back to summary |
|---|---|
| public AuthenticationStatus doNothing() Implements javax. Doc from javax. Instructs the container to "do nothing". When intending to do nothing, a JSR 375 authentication mechanism has to indicate this explicitly via its return value.
As a convenience this method returns NOT_DONE, so this method can be used in
one fluent return statement from an
| |
| forward | back to summary |
|---|---|
| public AuthenticationStatus forward(String path) Implements javax. Doc from javax. Forwards to another resource (servlet, JSP file, or HTML file) on the server.
As a convenience this method returns SEND_CONTINUE, so this method can be used in
one fluent return statement from an
| |
| getAuthParameters | back to summary |
|---|---|
| public AuthenticationParameters getAuthParameters() Implements javax. Doc from javax. Returns the parameters that were provided with the SecurityContext#authenticate(AuthParameters) call.
| |
| getCallerPrincipal | back to summary |
|---|---|
| public Principal getCallerPrincipal() Implements javax. Doc from javax. Gets the Principal set by a call to notifyContainerAboutLogin(). | |
| getClientSubject | back to summary |
|---|---|
| public Subject getClientSubject() Implements javax. Doc from javax. Returns the subject for which authentication is to take place. Note This is a low level object that most higher level code would not need to use directly. | |
| getGroups | back to summary |
|---|---|
| public Set Implements javax. Doc from javax. Gets the groups set by a call to notifyContainerAboutLogin(). | |
| getHandler | back to summary |
|---|---|
| public CallbackHandler getHandler() Implements javax. Doc from javax. Returns the low level JSR 196 handler that the runtime provided when creating this Note This is a low level object that most higher level code would not need to use directly.
| |
| getMessageInfo | back to summary |
|---|---|
| public MessageInfo getMessageInfo() Implements javax. Doc from javax. Returns the the low level JSR 196 message info instance for the current request. Note This is a low level object that most higher level code would not need to use directly.
| |
| getRequest | back to summary |
|---|---|
| public HttpServletRequest getRequest() Implements javax. Doc from javax. Returns the request object associated with the current request.
| |
| getResponse | back to summary |
|---|---|
| public HttpServletResponse getResponse() Implements javax. Doc from javax. Returns the response object associated with the current request.
| |
| getWrapped | back to summary |
|---|---|
| public HttpMessageContext getWrapped() | |
| isAuthenticationRequest | back to summary |
|---|---|
| public boolean isAuthenticationRequest() Implements javax. Doc from javax. Checks if the current call to an authentication mechanism is the result from the
application calling If SecurityContext#authenticate was not called, the authentication mechanism may have been invoked by the container at the start of a request.
| |
| isProtected | back to summary |
|---|---|
| public boolean isProtected() Implements javax. Doc from javax. Checks if the currently requested resource is protected or not. A protected resource
is a resource (e.g. a Servlet, JSF page, JSP page etc) for which a constraint has been defined
in e.g.
| |
| isRegisterSession | back to summary |
|---|---|
| public boolean isRegisterSession() Implements javax. Doc from javax. Check if the runtime has been asked to register an authentication session duing the current request.
| |
| notifyContainerAboutLogin | back to summary |
|---|---|
| public AuthenticationStatus notifyContainerAboutLogin(String username, Set<String> roles) Implements javax. Doc from javax. Asks the container to register the given caller name and groups in order to make
them available to the application for use with Note that after this call returned, the authenticated identity will not be immediately active. This will only take place (should no errors occur) after the authentication mechanism in which this call takes place returns control back to the container (runtime).
As a convenience this method returns SUCCESS, so this method can be used in
one fluent return statement from an
| |
| notifyContainerAboutLogin | back to summary |
|---|---|
| public AuthenticationStatus notifyContainerAboutLogin(Principal principal, Set<String> roles) Implements javax. Doc from javax. Asks the container to register the given caller principal and groups in order to make
them available to the application for use with Note that this call may result in the container establishing two caller principals to represent the caller's identity -- the Principal provided here as the principal parameter, and a second principal used as the container's representation of the caller identity. A second principal is added only if the container uses a different Principal type to represent the caller. If the types are the same, only one Principal is added.
If a second principal is added, the value returned by
When two principals are added, the container's caller principal is returned from
Note that after this call returned, the authenticated identity will not be immediately active. This will only take place (should no errors occur) after the authentication mechanism in which this call takes place returns control back to the container (runtime).
As a convenience this method returns SUCCESS, so this method can be used in
one fluent return statement from an
| |
| notifyContainerAboutLogin | back to summary |
|---|---|
| public AuthenticationStatus notifyContainerAboutLogin(CredentialValidationResult result) Implements javax. Doc from javax. Convenience method intended to pass the
If the outcome from the given
If the outcome from the given
| |
| redirect | back to summary |
|---|---|
| public AuthenticationStatus redirect(String location) Implements javax. Doc from javax. Sets the response status to SC_FOUND 302 (Found)
As a convenience this method returns SEND_CONTINUE, so this method can be used in
one fluent return statement from an
| |
| responseNotFound | back to summary |
|---|---|
| public AuthenticationStatus responseNotFound() Implements javax. Doc from javax. Sets the response status to 404 (not found).
As a convenience this method returns SEND_FAILURE, so this method can be used in
one fluent return statement from an
| |
| responseUnauthorized | back to summary |
|---|---|
| public AuthenticationStatus responseUnauthorized() Implements javax. Doc from javax. Sets the response status to 401 (unauthorized).
As a convenience this method returns SEND_FAILURE, so this method can be used in
one fluent return statement from an
| |
| setRegisterSession | back to summary |
|---|---|
| public void setRegisterSession(String callerName, Set<String> groups) Implements javax. Doc from javax. Asks the runtime to register an authentication session. This will automatically remember the logged-in status
as long as the current HTTP session remains valid. Without this being asked, a | |
| setRequest | back to summary |
|---|---|
| public void setRequest(HttpServletRequest request) Implements javax. Doc from javax. Sets the request object.
| |
| setResponse | back to summary |
|---|---|
| public void setResponse(HttpServletResponse response) Implements javax. Doc from javax. Set the response object.
| |
| withRequest | back to summary |
|---|---|
| public HttpMessageContext withRequest(HttpServletRequest request) Implements javax. Doc from javax. Sets the request object.
| |