blob: b905f42d96cb8870b5fc4b0d63f718cb7405c6d7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>HttpMessageContext</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HttpMessageContext";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanismWrapper.html" title="class in javax.security.enterprise.authentication.mechanism.http"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.html" title="class in javax.security.enterprise.authentication.mechanism.http"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html" target="_top">Frames</a></li>
<li><a href="HttpMessageContext.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">javax.security.enterprise.authentication.mechanism.http</div>
<h2 title="Interface HttpMessageContext" class="title">Interface HttpMessageContext</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.html" title="class in javax.security.enterprise.authentication.mechanism.http">HttpMessageContextWrapper</a>, <a href="../../../../../../org/apache/tomee/security/http/TomEEHttpMessageContext.html" title="class in org.apache.tomee.security.http">TomEEHttpMessageContext</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">HttpMessageContext</span></pre>
<div class="block"><code>HttpMessageContext</code> contains all of the per-request state information and encapsulates the client request,
server response, container handler for authentication callbacks, and the subject representing the caller.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#cleanClientSubject--">cleanClientSubject</a></span>()</code>
<div class="block">Convenience method to clean the subject associated with this context.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#doNothing--">doNothing</a></span>()</code>
<div class="block">Instructs the container to "do nothing".</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#forward-java.lang.String-">forward</a></span>(java.lang.String&nbsp;path)</code>
<div class="block">Forwards to another resource (servlet, JSP file, or HTML file) on the server.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/AuthenticationParameters.html" title="class in javax.security.enterprise.authentication.mechanism.http">AuthenticationParameters</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getAuthParameters--">getAuthParameters</a></span>()</code>
<div class="block">Returns the parameters that were provided with the SecurityContext#authenticate(AuthParameters) call.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.security.Principal</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getCallerPrincipal--">getCallerPrincipal</a></span>()</code>
<div class="block">Gets the Principal set by a call to notifyContainerAboutLogin().</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>javax.security.auth.Subject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getClientSubject--">getClientSubject</a></span>()</code>
<div class="block">Returns the subject for which authentication is to take place.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getGroups--">getGroups</a></span>()</code>
<div class="block">Gets the groups set by a call to notifyContainerAboutLogin().</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>javax.security.auth.callback.CallbackHandler</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getHandler--">getHandler</a></span>()</code>
<div class="block">Returns the low level JSR 196 handler that the runtime provided when creating this <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpMessageContext</code></a>,
and which this context uses to communicate the authentication details to the runtime.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>MessageInfo</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getMessageInfo--">getMessageInfo</a></span>()</code>
<div class="block">Returns the the low level JSR 196 message info instance for the current request.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getRequest--">getRequest</a></span>()</code>
<div class="block">Returns the request object associated with the current request.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http">HttpServletResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#getResponse--">getResponse</a></span>()</code>
<div class="block">Returns the response object associated with the current request.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#isAuthenticationRequest--">isAuthenticationRequest</a></span>()</code>
<div class="block">Checks if the current call to an authentication mechanism is the result from the
application calling <a href="../../../../../../javax/security/enterprise/SecurityContext.html#authenticate-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-javax.security.enterprise.authentication.mechanism.http.AuthenticationParameters-"><code>SecurityContext.authenticate(HttpServletRequest, HttpServletResponse, AuthenticationParameters)</code></a></div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#isProtected--">isProtected</a></span>()</code>
<div class="block">Checks if the currently requested resource is protected or not.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#isRegisterSession--">isRegisterSession</a></span>()</code>
<div class="block">Check if the runtime has been asked to register an authentication session duing the current request.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#notifyContainerAboutLogin-javax.security.enterprise.identitystore.CredentialValidationResult-">notifyContainerAboutLogin</a></span>(<a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.html" title="class in javax.security.enterprise.identitystore">CredentialValidationResult</a>&nbsp;result)</code>
<div class="block">Convenience method intended to pass the <code>CredentialValidationResult</code> result of an
identity store directly on to the container.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#notifyContainerAboutLogin-java.security.Principal-java.util.Set-">notifyContainerAboutLogin</a></span>(java.security.Principal&nbsp;principal,
java.util.Set&lt;java.lang.String&gt;&nbsp;groups)</code>
<div class="block">Asks the container to register the given caller principal and groups in order to make
them available to the application for use with <a href="../../../../../../javax/security/enterprise/SecurityContext.html#isCallerInRole-java.lang.String-"><code>SecurityContext.isCallerInRole(String)</code></a> etc.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#notifyContainerAboutLogin-java.lang.String-java.util.Set-">notifyContainerAboutLogin</a></span>(java.lang.String&nbsp;callername,
java.util.Set&lt;java.lang.String&gt;&nbsp;groups)</code>
<div class="block">Asks the container to register the given caller name and groups in order to make
them available to the application for use with <a href="../../../../../../javax/security/enterprise/SecurityContext.html#isCallerInRole-java.lang.String-"><code>SecurityContext.isCallerInRole(String)</code></a> etc.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#redirect-java.lang.String-">redirect</a></span>(java.lang.String&nbsp;location)</code>
<div class="block">Sets the response status to SC_FOUND 302 (Found)</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#responseNotFound--">responseNotFound</a></span>()</code>
<div class="block">Sets the response status to 404 (not found).</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#responseUnauthorized--">responseUnauthorized</a></span>()</code>
<div class="block">Sets the response status to 401 (unauthorized).</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#setRegisterSession-java.lang.String-java.util.Set-">setRegisterSession</a></span>(java.lang.String&nbsp;callerName,
java.util.Set&lt;java.lang.String&gt;&nbsp;groups)</code>
<div class="block">Asks the runtime to register an authentication session.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#setRequest-javax.servlet.http.HttpServletRequest-">setRequest</a></span>(<a href="../../../../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</code>
<div class="block">Sets the request object.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#setResponse-javax.servlet.http.HttpServletResponse-">setResponse</a></span>(<a href="../../../../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http">HttpServletResponse</a>&nbsp;response)</code>
<div class="block">Set the response object.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html" title="interface in javax.security.enterprise.authentication.mechanism.http">HttpMessageContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#withRequest-javax.servlet.http.HttpServletRequest-">withRequest</a></span>(<a href="../../../../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</code>
<div class="block">Sets the request object.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isProtected--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isProtected</h4>
<pre>boolean&nbsp;isProtected()</pre>
<div class="block">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. <code>web.xml</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if a protected resource was requested, false if a public resource was requested.</dd>
</dl>
</li>
</ul>
<a name="isAuthenticationRequest--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAuthenticationRequest</h4>
<pre>boolean&nbsp;isAuthenticationRequest()</pre>
<div class="block">Checks if the current call to an authentication mechanism is the result from the
application calling <a href="../../../../../../javax/security/enterprise/SecurityContext.html#authenticate-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-javax.security.enterprise.authentication.mechanism.http.AuthenticationParameters-"><code>SecurityContext.authenticate(HttpServletRequest, HttpServletResponse, AuthenticationParameters)</code></a>
<p>
If SecurityContext#authenticate was not called, the authentication mechanism may have been invoked by the
container at the start of a request.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if SecurityContext#authenticate was called, false if not.</dd>
</dl>
</li>
</ul>
<a name="isRegisterSession--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRegisterSession</h4>
<pre>boolean&nbsp;isRegisterSession()</pre>
<div class="block">Check if the runtime has been asked to register an authentication session duing the current request.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if code has asked to register an authentication session, false otherwise.</dd>
</dl>
</li>
</ul>
<a name="setRegisterSession-java.lang.String-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRegisterSession</h4>
<pre>void&nbsp;setRegisterSession(java.lang.String&nbsp;callerName,
java.util.Set&lt;java.lang.String&gt;&nbsp;groups)</pre>
<div class="block">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 <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a>
has to manually re-authenticate with the runtime at the start of each request.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callerName</code> - the caller name for which authentication should be be remembered</dd>
<dd><code>groups</code> - the groups for which authentication should be remembered.</dd>
</dl>
</li>
</ul>
<a name="cleanClientSubject--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cleanClientSubject</h4>
<pre>void&nbsp;cleanClientSubject()</pre>
<div class="block">Convenience method to clean the subject associated with this context.
<p>
Cleaning this subject is done as defined by the Servlet Container Profile of JASPIC
(JSR 196) for the ServerAuthModule#cleanSubject method and the
<a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html#cleanSubject-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-javax.security.enterprise.authentication.mechanism.http.HttpMessageContext-"><code>HttpAuthenticationMechanism.cleanSubject(HttpServletRequest, HttpServletResponse, HttpMessageContext)</code></a>
method defined by this specification.</div>
</li>
</ul>
<a name="getAuthParameters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAuthParameters</h4>
<pre><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/AuthenticationParameters.html" title="class in javax.security.enterprise.authentication.mechanism.http">AuthenticationParameters</a>&nbsp;getAuthParameters()</pre>
<div class="block">Returns the parameters that were provided with the SecurityContext#authenticate(AuthParameters) call.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the parameters that were provided with the SecurityContext#authenticate(AuthParameters) call, or a default instance. Never null.</dd>
</dl>
</li>
</ul>
<a name="getHandler--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHandler</h4>
<pre>javax.security.auth.callback.CallbackHandler&nbsp;getHandler()</pre>
<div class="block">Returns the low level JSR 196 handler that the runtime provided when creating this <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpMessageContext</code></a>,
and which this context uses to communicate the authentication details to the runtime.
<p>
<em>Note:</em> This is a low level object that most higher level code would not need to use directly.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the handler that the runtime provided to this context</dd>
</dl>
</li>
</ul>
<a name="getMessageInfo--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMessageInfo</h4>
<pre>MessageInfo&nbsp;getMessageInfo()</pre>
<div class="block">Returns the the low level JSR 196 message info instance for the current request.
<p>
<em>Note:</em> This is a low level object that most higher level code would not need to use directly.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message info instance for the current request.</dd>
</dl>
</li>
</ul>
<a name="getClientSubject--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClientSubject</h4>
<pre>javax.security.auth.Subject&nbsp;getClientSubject()</pre>
<div class="block">Returns the subject for which authentication is to take place.
<p>
<em>Note:</em> This is a low level object that most higher level code would not need to use directly.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the subject for which authentication is to take place.</dd>
</dl>
</li>
</ul>
<a name="getRequest--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequest</h4>
<pre><a href="../../../../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</a>&nbsp;getRequest()</pre>
<div class="block">Returns the request object associated with the current request.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the request object associated with the current request.</dd>
</dl>
</li>
</ul>
<a name="setRequest-javax.servlet.http.HttpServletRequest-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRequest</h4>
<pre>void&nbsp;setRequest(<a href="../../../../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</pre>
<div class="block">Sets the request object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the request object to be set</dd>
</dl>
</li>
</ul>
<a name="withRequest-javax.servlet.http.HttpServletRequest-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withRequest</h4>
<pre><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html" title="interface in javax.security.enterprise.authentication.mechanism.http">HttpMessageContext</a>&nbsp;withRequest(<a href="../../../../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</pre>
<div class="block">Sets the request object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the request object to be set.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the HttpMessageContext instance on which this method was called, useful for
fluent style call call chains.</dd>
</dl>
</li>
</ul>
<a name="getResponse--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponse</h4>
<pre><a href="../../../../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http">HttpServletResponse</a>&nbsp;getResponse()</pre>
<div class="block">Returns the response object associated with the current request.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the response object associated with the current request.</dd>
</dl>
</li>
</ul>
<a name="setResponse-javax.servlet.http.HttpServletResponse-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setResponse</h4>
<pre>void&nbsp;setResponse(<a href="../../../../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http">HttpServletResponse</a>&nbsp;response)</pre>
<div class="block">Set the response object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>response</code> - the response object to be set.</dd>
</dl>
</li>
</ul>
<a name="redirect-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>redirect</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;redirect(java.lang.String&nbsp;location)</pre>
<div class="block">Sets the response status to SC_FOUND 302 (Found)
<p>
As a convenience this method returns SEND_CONTINUE, so this method can be used in
one fluent return statement from an <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>location</code> - the location to redirect to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SEND_CONTINUE"><code>AuthenticationStatus.SEND_CONTINUE</code></a></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../javax/servlet/http/HttpServletResponse.html#sendRedirect-java.lang.String-"><code>HttpServletResponse.sendRedirect(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="forward-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forward</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;forward(java.lang.String&nbsp;path)</pre>
<div class="block">Forwards to another resource (servlet, JSP file, or HTML file) on the server.
<p>
As a convenience this method returns SEND_CONTINUE, so this method can be used in
one fluent return statement from an <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - a String specifying the pathname to the resource.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SEND_CONTINUE"><code>AuthenticationStatus.SEND_CONTINUE</code></a></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../javax/servlet/RequestDispatcher.html#forward-javax.servlet.ServletRequest-javax.servlet.ServletResponse-"><code>RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a></dd>
</dl>
</li>
</ul>
<a name="responseUnauthorized--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>responseUnauthorized</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;responseUnauthorized()</pre>
<div class="block">Sets the response status to 401 (unauthorized).
<p>
As a convenience this method returns SEND_FAILURE, so this method can be used in
one fluent return statement from an <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SEND_FAILURE"><code>AuthenticationStatus.SEND_FAILURE</code></a></dd>
</dl>
</li>
</ul>
<a name="responseNotFound--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>responseNotFound</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;responseNotFound()</pre>
<div class="block">Sets the response status to 404 (not found).
<p>
As a convenience this method returns SEND_FAILURE, so this method can be used in
one fluent return statement from an <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SEND_FAILURE"><code>AuthenticationStatus.SEND_FAILURE</code></a></dd>
</dl>
</li>
</ul>
<a name="notifyContainerAboutLogin-java.lang.String-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notifyContainerAboutLogin</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;notifyContainerAboutLogin(java.lang.String&nbsp;callername,
java.util.Set&lt;java.lang.String&gt;&nbsp;groups)</pre>
<div class="block">Asks the container to register the given caller name and groups in order to make
them available to the application for use with <a href="../../../../../../javax/security/enterprise/SecurityContext.html#isCallerInRole-java.lang.String-"><code>SecurityContext.isCallerInRole(String)</code></a> etc.
<p>
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).
<p>
As a convenience this method returns SUCCESS, so this method can be used in
one fluent return statement from an <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callername</code> - the caller name that will become the caller principal</dd>
<dd><code>groups</code> - the groups associated with the caller principal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SUCCESS"><code>AuthenticationStatus.SUCCESS</code></a></dd>
</dl>
</li>
</ul>
<a name="notifyContainerAboutLogin-java.security.Principal-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notifyContainerAboutLogin</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;notifyContainerAboutLogin(java.security.Principal&nbsp;principal,
java.util.Set&lt;java.lang.String&gt;&nbsp;groups)</pre>
<div class="block">Asks the container to register the given caller principal and groups in order to make
them available to the application for use with <a href="../../../../../../javax/security/enterprise/SecurityContext.html#isCallerInRole-java.lang.String-"><code>SecurityContext.isCallerInRole(String)</code></a> etc.
<p>
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.
<p>
If a second principal is added, the value returned by <code>Principal.getName()</code>
will be the same for both principals.
<p>
When two principals are added, the container's caller principal is returned from
<a href="../../../../../../javax/security/enterprise/SecurityContext.html#getCallerPrincipal--"><code>SecurityContext.getCallerPrincipal()</code></a>, and the principal supplied here
as a parameter can be retrieved using <a href="../../../../../../javax/security/enterprise/SecurityContext.html#getPrincipalsByType-java.lang.Class-"><code>SecurityContext.getPrincipalsByType(Class)</code></a>.
When only one is added, it is returned by <a href="../../../../../../javax/security/enterprise/SecurityContext.html#getCallerPrincipal--"><code>SecurityContext.getCallerPrincipal()</code></a>.
<p>
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).
<p>
As a convenience this method returns SUCCESS, so this method can be used in
one fluent return statement from an <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>principal</code> - the Principal that will become the caller principal</dd>
<dd><code>groups</code> - the groups associated with the caller principal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SUCCESS"><code>AuthenticationStatus.SUCCESS</code></a></dd>
</dl>
</li>
</ul>
<a name="notifyContainerAboutLogin-javax.security.enterprise.identitystore.CredentialValidationResult-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notifyContainerAboutLogin</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;notifyContainerAboutLogin(<a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.html" title="class in javax.security.enterprise.identitystore">CredentialValidationResult</a>&nbsp;result)</pre>
<div class="block">Convenience method intended to pass the <code>CredentialValidationResult</code> result of an
identity store directly on to the container.
<p>
If the outcome from the given <a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.html#getStatus--"><code>CredentialValidationResult.getStatus()</code></a> equals
<a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.Status.html#VALID"><code>CredentialValidationResult.Status.VALID</code></a>, the <a href="../../../../../../javax/security/enterprise/CallerPrincipal.html" title="class in javax.security.enterprise"><code>CallerPrincipal</code></a> and groups are obtained from the
<code>CredentialValidationResult</code> and passed into
<a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html#notifyContainerAboutLogin-java.security.Principal-java.util.Set-"><code>notifyContainerAboutLogin(Principal, Set)</code></a>.
<p>
If the outcome from the given <a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.html#getStatus--"><code>CredentialValidationResult.getStatus()</code></a> is not
equal to <a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.Status.html#VALID"><code>CredentialValidationResult.Status.VALID</code></a> a failure result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>result</code> - a CredentialValidationResult which is inspected for its status and from which the principal and groups
are taken.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SUCCESS"><code>AuthenticationStatus.SUCCESS</code></a> if <a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.html#getStatus--"><code>CredentialValidationResult.getStatus()</code></a>
equals <a href="../../../../../../javax/security/enterprise/identitystore/CredentialValidationResult.Status.html#VALID"><code>CredentialValidationResult.Status.VALID</code></a> otherwise <a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#SEND_FAILURE"><code>AuthenticationStatus.SEND_FAILURE</code></a></dd>
</dl>
</li>
</ul>
<a name="doNothing--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doNothing</h4>
<pre><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html" title="enum in javax.security.enterprise">AuthenticationStatus</a>&nbsp;doNothing()</pre>
<div class="block">Instructs the container to "do nothing".
<p>
When intending to do nothing, a JSR 375 authentication mechanism has to indicate this
explicitly via its return value.
<p>
As a convenience this method returns NOT_DONE, so this method can be used in
one fluent return statement from an <a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html" title="interface in javax.security.enterprise.authentication.mechanism.http"><code>HttpAuthenticationMechanism</code></a></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../../../javax/security/enterprise/AuthenticationStatus.html#NOT_DONE"><code>AuthenticationStatus.NOT_DONE</code></a></dd>
</dl>
</li>
</ul>
<a name="getCallerPrincipal--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCallerPrincipal</h4>
<pre>java.security.Principal&nbsp;getCallerPrincipal()</pre>
<div class="block">Gets the Principal set by a call to notifyContainerAboutLogin().</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The caller principal</dd>
</dl>
</li>
</ul>
<a name="getGroups--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getGroups</h4>
<pre>java.util.Set&lt;java.lang.String&gt;&nbsp;getGroups()</pre>
<div class="block">Gets the groups set by a call to notifyContainerAboutLogin().</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The groups</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanismWrapper.html" title="class in javax.security.enterprise.authentication.mechanism.http"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.html" title="class in javax.security.enterprise.authentication.mechanism.http"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.html" target="_top">Frames</a></li>
<li><a href="HttpMessageContext.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>