blob: c6fac23acb4e1444d62cd9b8c8397fda7fccb0e6 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="fr">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Jan 24 17:11:59 CET 2020 -->
<title>DefaultSubjectContext (Apache Shiro :: Core 1.5.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-01-24">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DefaultSubjectContext (Apache Shiro :: Core 1.5.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DefaultSubjectContext.html">Use</a></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" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.shiro.subject.support</a></div>
<h2 title="Class DefaultSubjectContext" class="title">Class DefaultSubjectContext</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../util/MapContext.html" title="class in org.apache.shiro.util">org.apache.shiro.util.MapContext</a></li>
<li>
<ul class="inheritance">
<li>org.apache.shiro.subject.support.DefaultSubjectContext</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&gt;</code>, <code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
<hr>
<pre>public class <a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.47">DefaultSubjectContext</a>
extends <a href="../../util/MapContext.html" title="class in org.apache.shiro.util">MapContext</a>
implements <a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></pre>
<div class="block">Default implementation of the <a href="../SubjectContext.html" title="interface in org.apache.shiro.subject"><code>SubjectContext</code></a> interface. Note that the getters and setters are not
simple pass-through methods to an underlying attribute; the getters will employ numerous heuristics to acquire
their data attribute as best as possible (for example, if <a href="#getPrincipals()"><code>getPrincipals()</code></a> is invoked, if the principals aren't
in the backing map, it might check to see if there is a subject or session in the map and attempt to acquire the
principals from those objects).</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.shiro.subject.support.DefaultSubjectContext">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.java.util.Map">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;java.util.<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util" class="externalLink">Map.Entry</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util" class="externalLink">K</a> extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util" class="externalLink">V</a> extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&gt;</code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#AUTHENTICATED_SESSION_KEY">AUTHENTICATED_SESSION_KEY</a></span></code></th>
<td class="colLast">
<div class="block">The session key that is used to store whether or not the user is authenticated.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PRINCIPALS_SESSION_KEY">PRINCIPALS_SESSION_KEY</a></span></code></th>
<td class="colLast">
<div class="block">The session key that is used to store subject principals.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SESSION_CREATION_ENABLED">SESSION_CREATION_ENABLED</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">DefaultSubjectContext</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.shiro.subject.SubjectContext)">DefaultSubjectContext</a></span>&#8203;(<a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a>&nbsp;ctx)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../authc/AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAuthenticationInfo()">getAuthenticationInfo</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../authc/AuthenticationToken.html" title="interface in org.apache.shiro.authc">AuthenticationToken</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAuthenticationToken()">getAuthenticationToken</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHost()">getHost</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the host name or IP that should reflect the constructed <code>Subject</code>'s originating location.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPrincipals()">getPrincipals</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the principals (aka identity) that the constructed <code>Subject</code> should reflect.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSecurityManager()">getSecurityManager</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the SecurityManager instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance or
<code>null</code> if one has not yet been provided to this context.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../session/Session.html" title="interface in org.apache.shiro.session">Session</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSession()">getSession</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <code>Session</code> to use when building the <code>Subject</code> instance.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSessionId()">getSessionId</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the session id of the session that should be associated with the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../Subject.html" title="interface in org.apache.shiro.subject">Subject</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSubject()">getSubject</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns any existing <code>Subject</code> that may be in use at the time the new <code>Subject</code> instance is
being created.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAuthenticated()">isAuthenticated</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the constructed <code>Subject</code> should be considered authenticated, <code>false</code>
otherwise.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSessionCreationEnabled()">isSessionCreationEnabled</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the constructed <code>Subject</code> should be allowed to create a session, <code>false</code>
otherwise.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolveAuthenticated()">resolveAuthenticated</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolveHost()">resolveHost</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolvePrincipals()">resolvePrincipals</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolveSecurityManager()">resolveSecurityManager</a></span>()</code></th>
<td class="colLast">
<div class="block">Resolves the <code>SecurityManager</code> instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a>
instance (typically used to support <a href="DelegatingSubject.html" title="class in org.apache.shiro.subject.support"><code>DelegatingSubject</code></a> implementations).</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../session/Session.html" title="interface in org.apache.shiro.session">Session</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolveSession()">resolveSession</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAuthenticated(boolean)">setAuthenticated</a></span>&#8203;(boolean&nbsp;authc)</code></th>
<td class="colLast">
<div class="block">Sets whether or not the constructed <code>Subject</code> instance should be considered as authenticated.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAuthenticationInfo(org.apache.shiro.authc.AuthenticationInfo)">setAuthenticationInfo</a></span>&#8203;(<a href="../../authc/AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a>&nbsp;info)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAuthenticationToken(org.apache.shiro.authc.AuthenticationToken)">setAuthenticationToken</a></span>&#8203;(<a href="../../authc/AuthenticationToken.html" title="interface in org.apache.shiro.authc">AuthenticationToken</a>&nbsp;token)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setHost(java.lang.String)">setHost</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;host)</code></th>
<td class="colLast">
<div class="block">Sets the host name or IP that should reflect the constructed <code>Subject</code>'s originating location.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPrincipals(org.apache.shiro.subject.PrincipalCollection)">setPrincipals</a></span>&#8203;(<a href="../PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</code></th>
<td class="colLast">
<div class="block">Sets the principals (aka identity) that the constructed <code>Subject</code> should reflect.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSecurityManager(org.apache.shiro.mgt.SecurityManager)">setSecurityManager</a></span>&#8203;(<a href="../../mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</a>&nbsp;securityManager)</code></th>
<td class="colLast">
<div class="block">Sets the SecurityManager instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance
(typically used to support <a href="DelegatingSubject.html" title="class in org.apache.shiro.subject.support"><code>DelegatingSubject</code></a> implementations).</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSession(org.apache.shiro.session.Session)">setSession</a></span>&#8203;(<a href="../../session/Session.html" title="interface in org.apache.shiro.session">Session</a>&nbsp;session)</code></th>
<td class="colLast">
<div class="block">Sets the <code>Session</code> to use when building the <code>Subject</code> instance.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSessionCreationEnabled(boolean)">setSessionCreationEnabled</a></span>&#8203;(boolean&nbsp;enabled)</code></th>
<td class="colLast">
<div class="block">Sets whether or not the constructed <code>Subject</code> instance should be allowed to create a session,
<code>false</code> otherwise.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSessionId(java.io.Serializable)">setSessionId</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&nbsp;sessionId)</code></th>
<td class="colLast">
<div class="block">Sets the session id of the session that should be associated with the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSubject(org.apache.shiro.subject.Subject)">setSubject</a></span>&#8203;(<a href="../Subject.html" title="interface in org.apache.shiro.subject">Subject</a>&nbsp;subject)</code></th>
<td class="colLast">
<div class="block">Sets the existing <code>Subject</code> that may be in use at the time the new <code>Subject</code> instance is
being created.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.util.MapContext">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.util.<a href="../../util/MapContext.html" title="class in org.apache.shiro.util">MapContext</a></h3>
<code><a href="../../util/MapContext.html#clear()">clear</a>, <a href="../../util/MapContext.html#containsKey(java.lang.Object)">containsKey</a>, <a href="../../util/MapContext.html#containsValue(java.lang.Object)">containsValue</a>, <a href="../../util/MapContext.html#entrySet()">entrySet</a>, <a href="../../util/MapContext.html#get(java.lang.Object)">get</a>, <a href="../../util/MapContext.html#getTypedValue(java.lang.String,java.lang.Class)">getTypedValue</a>, <a href="../../util/MapContext.html#isEmpty()">isEmpty</a>, <a href="../../util/MapContext.html#keySet()">keySet</a>, <a href="../../util/MapContext.html#nullSafePut(java.lang.String,java.lang.Object)">nullSafePut</a>, <a href="../../util/MapContext.html#put(java.lang.String,java.lang.Object)">put</a>, <a href="../../util/MapContext.html#putAll(java.util.Map)">putAll</a>, <a href="../../util/MapContext.html#remove(java.lang.Object)">remove</a>, <a href="../../util/MapContext.html#size()">size</a>, <a href="../../util/MapContext.html#values()">values</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.util.Map">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.util.<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#clear()" title="class or interface in java.util" class="externalLink">clear</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#compute(K,java.util.function.BiFunction)" title="class or interface in java.util" class="externalLink">compute</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#computeIfAbsent(K,java.util.function.Function)" title="class or interface in java.util" class="externalLink">computeIfAbsent</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#computeIfPresent(K,java.util.function.BiFunction)" title="class or interface in java.util" class="externalLink">computeIfPresent</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#containsKey(java.lang.Object)" title="class or interface in java.util" class="externalLink">containsKey</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#containsValue(java.lang.Object)" title="class or interface in java.util" class="externalLink">containsValue</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#entrySet()" title="class or interface in java.util" class="externalLink">entrySet</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#forEach(java.util.function.BiConsumer)" title="class or interface in java.util" class="externalLink">forEach</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#get(java.lang.Object)" title="class or interface in java.util" class="externalLink">get</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#getOrDefault(java.lang.Object,V)" title="class or interface in java.util" class="externalLink">getOrDefault</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#hashCode()" title="class or interface in java.util" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#isEmpty()" title="class or interface in java.util" class="externalLink">isEmpty</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#keySet()" title="class or interface in java.util" class="externalLink">keySet</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#merge(K,V,java.util.function.BiFunction)" title="class or interface in java.util" class="externalLink">merge</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#put(K,V)" title="class or interface in java.util" class="externalLink">put</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#putAll(java.util.Map)" title="class or interface in java.util" class="externalLink">putAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#putIfAbsent(K,V)" title="class or interface in java.util" class="externalLink">putIfAbsent</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util" class="externalLink">remove</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#remove(java.lang.Object,java.lang.Object)" title="class or interface in java.util" class="externalLink">remove</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#replace(K,V)" title="class or interface in java.util" class="externalLink">replace</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#replace(K,V,V)" title="class or interface in java.util" class="externalLink">replace</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#replaceAll(java.util.function.BiFunction)" title="class or interface in java.util" class="externalLink">replaceAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#size()" title="class or interface in java.util" class="externalLink">size</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#values()" title="class or interface in java.util" class="externalLink">values</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="SESSION_CREATION_ENABLED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SESSION_CREATION_ENABLED</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.67">SESSION_CREATION_ENABLED</a></pre>
</li>
</ul>
<a id="PRINCIPALS_SESSION_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PRINCIPALS_SESSION_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.72">PRINCIPALS_SESSION_KEY</a></pre>
<div class="block">The session key that is used to store subject principals.</div>
</li>
</ul>
<a id="AUTHENTICATED_SESSION_KEY">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AUTHENTICATED_SESSION_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.77">AUTHENTICATED_SESSION_KEY</a></pre>
<div class="block">The session key that is used to store whether or not the user is authenticated.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DefaultSubjectContext</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.81">DefaultSubjectContext</a>()</pre>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.shiro.subject.SubjectContext)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DefaultSubjectContext</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.85">DefaultSubjectContext</a>&#8203;(<a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a>&nbsp;ctx)</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getSecurityManager()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSecurityManager</h4>
<pre class="methodSignature">public&nbsp;<a href="../../mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.89">getSecurityManager</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#getSecurityManager()">SubjectContext</a></code></span></div>
<div class="block">Returns the SecurityManager instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance or
<code>null</code> if one has not yet been provided to this context.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getSecurityManager()">getSecurityManager</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the SecurityManager instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance or
<code>null</code> if one has not yet been provided to this context.</dd>
</dl>
</li>
</ul>
<a id="setSecurityManager(org.apache.shiro.mgt.SecurityManager)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSecurityManager</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.93">setSecurityManager</a>&#8203;(<a href="../../mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</a>&nbsp;securityManager)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setSecurityManager(org.apache.shiro.mgt.SecurityManager)">SubjectContext</a></code></span></div>
<div class="block">Sets the SecurityManager instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance
(typically used to support <a href="DelegatingSubject.html" title="class in org.apache.shiro.subject.support"><code>DelegatingSubject</code></a> implementations).</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setSecurityManager(org.apache.shiro.mgt.SecurityManager)">setSecurityManager</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>securityManager</code> - the SecurityManager instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a>
instance.</dd>
</dl>
</li>
</ul>
<a id="resolveSecurityManager()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolveSecurityManager</h4>
<pre class="methodSignature">public&nbsp;<a href="../../mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.97">resolveSecurityManager</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#resolveSecurityManager()">SubjectContext</a></code></span></div>
<div class="block">Resolves the <code>SecurityManager</code> instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a>
instance (typically used to support <a href="DelegatingSubject.html" title="class in org.apache.shiro.subject.support"><code>DelegatingSubject</code></a> implementations).</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#resolveSecurityManager()">resolveSecurityManager</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>SecurityManager</code> instance that should be used to back the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a>
instance</dd>
</dl>
</li>
</ul>
<a id="getSessionId()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSessionId</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.115">getSessionId</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#getSessionId()">SubjectContext</a></code></span></div>
<div class="block">Returns the session id of the session that should be associated with the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance.
<p/>
The construction process is expected to resolve the session with the specified id and then construct the Subject
instance based on the resolved session.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getSessionId()">getSessionId</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the session id of the session that should be associated with the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance.</dd>
</dl>
</li>
</ul>
<a id="setSessionId(java.io.Serializable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSessionId</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.119">setSessionId</a>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&nbsp;sessionId)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setSessionId(java.io.Serializable)">SubjectContext</a></code></span></div>
<div class="block">Sets the session id of the session that should be associated with the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a> instance.
<p/>
The construction process is expected to resolve the session with the specified id and then construct the Subject
instance based on the resolved session.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setSessionId(java.io.Serializable)">setSessionId</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sessionId</code> - the session id of the session that should be associated with the constructed <a href="../Subject.html" title="interface in org.apache.shiro.subject"><code>Subject</code></a>
instance.</dd>
</dl>
</li>
</ul>
<a id="getSubject()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSubject</h4>
<pre class="methodSignature">public&nbsp;<a href="../Subject.html" title="interface in org.apache.shiro.subject">Subject</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.123">getSubject</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#getSubject()">SubjectContext</a></code></span></div>
<div class="block">Returns any existing <code>Subject</code> that may be in use at the time the new <code>Subject</code> instance is
being created.
<p/>
This is typically used in the case where the existing <code>Subject</code> instance returned by
this method is unauthenticated and a new <code>Subject</code> instance is being created to reflect a successful
authentication - you want to return most of the state of the previous <code>Subject</code> instance when creating the
newly authenticated instance.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getSubject()">getSubject</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>any existing <code>Subject</code> that may be in use at the time the new <code>Subject</code> instance is
being created.</dd>
</dl>
</li>
</ul>
<a id="setSubject(org.apache.shiro.subject.Subject)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSubject</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.127">setSubject</a>&#8203;(<a href="../Subject.html" title="interface in org.apache.shiro.subject">Subject</a>&nbsp;subject)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setSubject(org.apache.shiro.subject.Subject)">SubjectContext</a></code></span></div>
<div class="block">Sets the existing <code>Subject</code> that may be in use at the time the new <code>Subject</code> instance is
being created.
<p/>
This is typically used in the case where the existing <code>Subject</code> instance returned by
this method is unauthenticated and a new <code>Subject</code> instance is being created to reflect a successful
authentication - you want to return most of the state of the previous <code>Subject</code> instance when creating the
newly authenticated instance.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setSubject(org.apache.shiro.subject.Subject)">setSubject</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>subject</code> - the existing <code>Subject</code> that may be in use at the time the new <code>Subject</code> instance is
being created.</dd>
</dl>
</li>
</ul>
<a id="getPrincipals()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrincipals</h4>
<pre class="methodSignature">public&nbsp;<a href="../PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.131">getPrincipals</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#getPrincipals()">SubjectContext</a></code></span></div>
<div class="block">Returns the principals (aka identity) that the constructed <code>Subject</code> should reflect.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getPrincipals()">getPrincipals</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the principals (aka identity) that the constructed <code>Subject</code> should reflect.</dd>
</dl>
</li>
</ul>
<a id="setPrincipals(org.apache.shiro.subject.PrincipalCollection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPrincipals</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.139">setPrincipals</a>&#8203;(<a href="../PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setPrincipals(org.apache.shiro.subject.PrincipalCollection)">SubjectContext</a></code></span></div>
<div class="block">Sets the principals (aka identity) that the constructed <code>Subject</code> should reflect.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setPrincipals(org.apache.shiro.subject.PrincipalCollection)">setPrincipals</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>principals</code> - the principals (aka identity) that the constructed <code>Subject</code> should reflect.</dd>
</dl>
</li>
</ul>
<a id="resolvePrincipals()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolvePrincipals</h4>
<pre class="methodSignature">public&nbsp;<a href="../PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.145">resolvePrincipals</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#resolvePrincipals()">resolvePrincipals</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
<a id="getSession()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSession</h4>
<pre class="methodSignature">public&nbsp;<a href="../../session/Session.html" title="interface in org.apache.shiro.session">Session</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.175">getSession</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#getSession()">SubjectContext</a></code></span></div>
<div class="block">Returns the <code>Session</code> to use when building the <code>Subject</code> instance. Note that it is more
common to specify a <a href="../SubjectContext.html#setSessionId(java.io.Serializable)"><code>sessionId</code></a> to acquire the desired session rather than having to
construct a <code>Session</code> to be returned by this method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getSession()">getSession</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>Session</code> to use when building the <code>Subject</code> instance.</dd>
</dl>
</li>
</ul>
<a id="setSession(org.apache.shiro.session.Session)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSession</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.179">setSession</a>&#8203;(<a href="../../session/Session.html" title="interface in org.apache.shiro.session">Session</a>&nbsp;session)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setSession(org.apache.shiro.session.Session)">SubjectContext</a></code></span></div>
<div class="block">Sets the <code>Session</code> to use when building the <code>Subject</code> instance. Note that it is more
common to specify a <a href="../SubjectContext.html#setSessionId(java.io.Serializable)"><code>sessionId</code></a> to automatically resolve the desired session rather than
constructing a <code>Session</code> to call this method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setSession(org.apache.shiro.session.Session)">setSession</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>session</code> - the <code>Session</code> to use when building the <code>Subject</code> instance.</dd>
</dl>
</li>
</ul>
<a id="resolveSession()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolveSession</h4>
<pre class="methodSignature">public&nbsp;<a href="../../session/Session.html" title="interface in org.apache.shiro.session">Session</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.183">resolveSession</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#resolveSession()">resolveSession</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
<a id="isSessionCreationEnabled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSessionCreationEnabled</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.195">isSessionCreationEnabled</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#isSessionCreationEnabled()">SubjectContext</a></code></span></div>
<div class="block">Returns <code>true</code> if the constructed <code>Subject</code> should be allowed to create a session, <code>false</code>
otherwise. Shiro's configuration defaults to <code>true</code> as most applications find value in Sessions.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#isSessionCreationEnabled()">isSessionCreationEnabled</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the constructed <code>Subject</code> should be allowed to create sessions, <code>false</code>
otherwise.</dd>
</dl>
</li>
</ul>
<a id="setSessionCreationEnabled(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSessionCreationEnabled</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.200">setSessionCreationEnabled</a>&#8203;(boolean&nbsp;enabled)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setSessionCreationEnabled(boolean)">SubjectContext</a></code></span></div>
<div class="block">Sets whether or not the constructed <code>Subject</code> instance should be allowed to create a session,
<code>false</code> otherwise.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setSessionCreationEnabled(boolean)">setSessionCreationEnabled</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>enabled</code> - whether or not the constructed <code>Subject</code> instance should be allowed to create a session,
<code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a id="isAuthenticated()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAuthenticated</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.204">isAuthenticated</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#isAuthenticated()">SubjectContext</a></code></span></div>
<div class="block">Returns <code>true</code> if the constructed <code>Subject</code> should be considered authenticated, <code>false</code>
otherwise. Be careful setting this value to <code>true</code> - you should know what you are doing and have a good
reason for ignoring Shiro's default authentication state mechanisms.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#isAuthenticated()">isAuthenticated</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the constructed <code>Subject</code> should be considered authenticated, <code>false</code>
otherwise.</dd>
</dl>
</li>
</ul>
<a id="setAuthenticated(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthenticated</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.209">setAuthenticated</a>&#8203;(boolean&nbsp;authc)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setAuthenticated(boolean)">SubjectContext</a></code></span></div>
<div class="block">Sets whether or not the constructed <code>Subject</code> instance should be considered as authenticated. Be careful
when specifying <code>true</code> - you should know what you are doing and have a good reason for ignoring Shiro's
default authentication state mechanisms.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setAuthenticated(boolean)">setAuthenticated</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>authc</code> - whether or not the constructed <code>Subject</code> instance should be considered as authenticated.</dd>
</dl>
</li>
</ul>
<a id="resolveAuthenticated()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolveAuthenticated</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.213">resolveAuthenticated</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#resolveAuthenticated()">resolveAuthenticated</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
<a id="getAuthenticationInfo()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAuthenticationInfo</h4>
<pre class="methodSignature">public&nbsp;<a href="../../authc/AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.233">getAuthenticationInfo</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getAuthenticationInfo()">getAuthenticationInfo</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
<a id="setAuthenticationInfo(org.apache.shiro.authc.AuthenticationInfo)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthenticationInfo</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.237">setAuthenticationInfo</a>&#8203;(<a href="../../authc/AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a>&nbsp;info)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setAuthenticationInfo(org.apache.shiro.authc.AuthenticationInfo)">setAuthenticationInfo</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
<a id="getAuthenticationToken()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAuthenticationToken</h4>
<pre class="methodSignature">public&nbsp;<a href="../../authc/AuthenticationToken.html" title="interface in org.apache.shiro.authc">AuthenticationToken</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.241">getAuthenticationToken</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getAuthenticationToken()">getAuthenticationToken</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
<a id="setAuthenticationToken(org.apache.shiro.authc.AuthenticationToken)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthenticationToken</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.245">setAuthenticationToken</a>&#8203;(<a href="../../authc/AuthenticationToken.html" title="interface in org.apache.shiro.authc">AuthenticationToken</a>&nbsp;token)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setAuthenticationToken(org.apache.shiro.authc.AuthenticationToken)">setAuthenticationToken</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
<a id="getHost()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHost</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.249">getHost</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#getHost()">SubjectContext</a></code></span></div>
<div class="block">Returns the host name or IP that should reflect the constructed <code>Subject</code>'s originating location.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#getHost()">getHost</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the host name or IP that should reflect the constructed <code>Subject</code>'s originating location.</dd>
</dl>
</li>
</ul>
<a id="setHost(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHost</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.253">setHost</a>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;host)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../SubjectContext.html#setHost(java.lang.String)">SubjectContext</a></code></span></div>
<div class="block">Sets the host name or IP that should reflect the constructed <code>Subject</code>'s originating location.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#setHost(java.lang.String)">setHost</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>host</code> - the host name or IP that should reflect the constructed <code>Subject</code>'s originating location.</dd>
</dl>
</li>
</ul>
<a id="resolveHost()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>resolveHost</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/subject/support/DefaultSubjectContext.html#line.259">resolveHost</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../SubjectContext.html#resolveHost()">resolveHost</a></code>&nbsp;in interface&nbsp;<code><a href="../SubjectContext.html" title="interface in org.apache.shiro.subject">SubjectContext</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DefaultSubjectContext.html">Use</a></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" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2004&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>