| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>SecurityContext</title> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="SecurityContext"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":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="../../../../jakarta/ws/rs/core/Response.StatusType.html" title="interface in jakarta.ws.rs.core"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../jakarta/ws/rs/core/StreamingOutput.html" title="interface in jakarta.ws.rs.core"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?jakarta/ws/rs/core/SecurityContext.html" target="_top">Frames</a></li> |
| <li><a href="SecurityContext.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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">jakarta.ws.rs.core</div> |
| <h2 title="Interface SecurityContext" class="title">Interface SecurityContext</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">SecurityContext</span></pre> |
| <div class="block">An injectable interface that provides access to security related information.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../jakarta/ws/rs/core/Context.html" title="annotation in jakarta.ws.rs.core"><code>Context</code></a></dd> |
| <dt><span class="simpleTagLabel">Examples (en):</span></dt> |
| <dd><a href="../../../../../../../tomee-9.0/examples/security-tomcat-user-identitystore.html">security-tomcat-user-identitystore</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#BASIC_AUTH">BASIC_AUTH</a></span></code> |
| <div class="block">String identifier for Basic authentication.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#CLIENT_CERT_AUTH">CLIENT_CERT_AUTH</a></span></code> |
| <div class="block">String identifier for Client Certificate authentication.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#DIGEST_AUTH">DIGEST_AUTH</a></span></code> |
| <div class="block">String identifier for Digest authentication.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#FORM_AUTH">FORM_AUTH</a></span></code> |
| <div class="block">String identifier for Form authentication.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#getAuthenticationScheme--">getAuthenticationScheme</a></span>()</code> |
| <div class="block">Returns the string value of the authentication scheme used to protect the resource.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.security.Principal</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#getUserPrincipal--">getUserPrincipal</a></span>()</code> |
| <div class="block">Returns a <code>java.security.Principal</code> object containing the name of the current authenticated user.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#isSecure--">isSecure</a></span>()</code> |
| <div class="block">Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/SecurityContext.html#isUserInRole-java.lang.String-">isUserInRole</a></span>(java.lang.String role)</code> |
| <div class="block">Returns a boolean indicating whether the authenticated user is included in the specified logical "role".</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="BASIC_AUTH"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BASIC_AUTH</h4> |
| <pre>static final java.lang.String BASIC_AUTH</pre> |
| <div class="block">String identifier for Basic authentication. Value "BASIC"</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#jakarta.ws.rs.core.SecurityContext.BASIC_AUTH">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="CLIENT_CERT_AUTH"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CLIENT_CERT_AUTH</h4> |
| <pre>static final java.lang.String CLIENT_CERT_AUTH</pre> |
| <div class="block">String identifier for Client Certificate authentication. Value "CLIENT_CERT"</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#jakarta.ws.rs.core.SecurityContext.CLIENT_CERT_AUTH">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="DIGEST_AUTH"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DIGEST_AUTH</h4> |
| <pre>static final java.lang.String DIGEST_AUTH</pre> |
| <div class="block">String identifier for Digest authentication. Value "DIGEST"</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#jakarta.ws.rs.core.SecurityContext.DIGEST_AUTH">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="FORM_AUTH"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>FORM_AUTH</h4> |
| <pre>static final java.lang.String FORM_AUTH</pre> |
| <div class="block">String identifier for Form authentication. Value "FORM"</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#jakarta.ws.rs.core.SecurityContext.FORM_AUTH">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getUserPrincipal--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUserPrincipal</h4> |
| <pre>java.security.Principal getUserPrincipal()</pre> |
| <div class="block">Returns a <code>java.security.Principal</code> object containing the name of the current authenticated user. If the |
| user has not been authenticated, the method returns null.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>java.security.Principal</code> containing the name of the user making this request; null if the user |
| has not been authenticated</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isUserInRole-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isUserInRole</h4> |
| <pre>boolean isUserInRole(java.lang.String role)</pre> |
| <div class="block">Returns a boolean indicating whether the authenticated user is included in the specified logical "role". If the user |
| has not been authenticated, the method returns <code>false</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>role</code> - a <code>String</code> specifying the name of the role</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>boolean</code> indicating whether the user making the request belongs to a given role; |
| <code>false</code> if the user has not been authenticated</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSecure--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSecure</h4> |
| <pre>boolean isSecure()</pre> |
| <div class="block">Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the request was made using a secure channel, <code>false</code> otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAuthenticationScheme--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getAuthenticationScheme</h4> |
| <pre>java.lang.String getAuthenticationScheme()</pre> |
| <div class="block">Returns the string value of the authentication scheme used to protect the resource. If the resource is not |
| authenticated, null is returned. |
| |
| Values are the same as the CGI variable AUTH_TYPE</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>one of the static members BASIC_AUTH, FORM_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH (suitable for == comparison) |
| or the container-specific string indicating the authentication scheme, or null if the request was not authenticated.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request</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="../../../../jakarta/ws/rs/core/Response.StatusType.html" title="interface in jakarta.ws.rs.core"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../jakarta/ws/rs/core/StreamingOutput.html" title="interface in jakarta.ws.rs.core"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?jakarta/ws/rs/core/SecurityContext.html" target="_top">Frames</a></li> |
| <li><a href="SecurityContext.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |