blob: 87340f2a01a2489538f77674df09f5839e53d8f3 [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>SimpleAuthenticationInfo (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="SimpleAuthenticationInfo (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};
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/SimpleAuthenticationInfo.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>Nested&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.authc</a></div>
<h2 title="Class SimpleAuthenticationInfo" class="title">Class SimpleAuthenticationInfo</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>org.apache.shiro.authc.SimpleAuthenticationInfo</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="AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a></code>, <code><a href="MergableAuthenticationInfo.html" title="interface in org.apache.shiro.authc">MergableAuthenticationInfo</a></code>, <code><a href="SaltedAuthenticationInfo.html" title="interface in org.apache.shiro.authc">SaltedAuthenticationInfo</a></code></dd>
</dl>
<hr>
<pre>public class <a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.38">SimpleAuthenticationInfo</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>
implements <a href="MergableAuthenticationInfo.html" title="interface in org.apache.shiro.authc">MergableAuthenticationInfo</a>, <a href="SaltedAuthenticationInfo.html" title="interface in org.apache.shiro.authc">SaltedAuthenticationInfo</a></pre>
<div class="block">Simple implementation of the <a href="MergableAuthenticationInfo.html" title="interface in org.apache.shiro.authc"><code>MergableAuthenticationInfo</code></a> interface that holds the principals and
credentials.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.9</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../realm/AuthenticatingRealm.html" title="class in org.apache.shiro.realm"><code>AuthenticatingRealm</code></a>,
<a href="../../../../serialized-form.html#org.apache.shiro.authc.SimpleAuthenticationInfo">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== 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>protected <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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#credentials">credentials</a></span></code></th>
<td class="colLast">
<div class="block">The credentials verifying the account principals.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected org.apache.shiro.util.ByteSource</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#credentialsSalt">credentialsSalt</a></span></code></th>
<td class="colLast">
<div class="block">Any salt used in hashing the credentials.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#principals">principals</a></span></code></th>
<td class="colLast">
<div class="block">The principals identifying the account associated with this AuthenticationInfo instance.</div>
</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()">SimpleAuthenticationInfo</a></span>()</code></th>
<td class="colLast">
<div class="block">Default no-argument constructor.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Object,java.lang.Object,java.lang.String)">SimpleAuthenticationInfo</a></span>&#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>&nbsp;principal,
<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>&nbsp;credentials,
<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;realmName)</code></th>
<td class="colLast">
<div class="block">Constructor that takes in a single 'primary' principal of the account and its corresponding credentials,
associated with the specified realm.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Object,java.lang.Object,org.apache.shiro.util.ByteSource,java.lang.String)">SimpleAuthenticationInfo</a></span>&#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>&nbsp;principal,
<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>&nbsp;hashedCredentials,
org.apache.shiro.util.ByteSource&nbsp;credentialsSalt,
<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;realmName)</code></th>
<td class="colLast">
<div class="block">Constructor that takes in a single 'primary' principal of the account, its corresponding hashed credentials,
the salt used to hash the credentials, and the name of the realm to associate with the principals.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.shiro.subject.PrincipalCollection,java.lang.Object)">SimpleAuthenticationInfo</a></span>&#8203;(<a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals,
<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>&nbsp;credentials)</code></th>
<td class="colLast">
<div class="block">Constructor that takes in an account's identifying principal(s) and its corresponding credentials that verify
the principals.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.shiro.subject.PrincipalCollection,java.lang.Object,org.apache.shiro.util.ByteSource)">SimpleAuthenticationInfo</a></span>&#8203;(<a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals,
<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>&nbsp;hashedCredentials,
org.apache.shiro.util.ByteSource&nbsp;credentialsSalt)</code></th>
<td class="colLast">
<div class="block">Constructor that takes in an account's identifying principal(s), hashed credentials used to verify the
principals, and the salt used when hashing the credentials.</div>
</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>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>&#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>&nbsp;o)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the Object argument is an <code>instanceof SimpleAuthenticationInfo</code> and
its <a href="#getPrincipals()"><code>principals</code></a> are equal to this instance's principals, <code>false</code> otherwise.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCredentials()">getCredentials</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the credentials associated with the corresponding Subject.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>org.apache.shiro.util.ByteSource</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCredentialsSalt()">getCredentialsSalt</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the salt used to hash the credentials, or <code>null</code> if no salt was used or credentials were not
hashed at all.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../subject/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 all principals associated with the corresponding Subject.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the hashcode of the internal <a href="#getPrincipals()"><code>principals</code></a> instance.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#merge(org.apache.shiro.authc.AuthenticationInfo)">merge</a></span>&#8203;(<a href="AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a>&nbsp;info)</code></th>
<td class="colLast">
<div class="block">Takes the specified <code>info</code> argument and adds its principals and credentials into this instance.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCredentials(java.lang.Object)">setCredentials</a></span>&#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>&nbsp;credentials)</code></th>
<td class="colLast">
<div class="block">Sets the credentials that verify the principals/identity of the associated Realm account.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCredentialsSalt(org.apache.shiro.util.ByteSource)">setCredentialsSalt</a></span>&#8203;(org.apache.shiro.util.ByteSource&nbsp;salt)</code></th>
<td class="colLast">
<div class="block">Sets the salt used to hash the credentials, or <code>null</code> if no salt was used or credentials were not
hashed at all.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<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="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</code></th>
<td class="colLast">
<div class="block">Sets the identifying principal(s) represented by this instance.</div>
</td>
</tr>
<tr id="i9" 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="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Simple implementation that merely returns <code><a href="#getPrincipals()"><code>principals</code></a>.toString()</code></div>
</td>
</tr>
</table>
<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#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#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#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>
</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="principals">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>principals</h4>
<pre>protected&nbsp;<a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a> <a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.43">principals</a></pre>
<div class="block">The principals identifying the account associated with this AuthenticationInfo instance.</div>
</li>
</ul>
<a id="credentials">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>credentials</h4>
<pre>protected&nbsp;<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> <a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.47">credentials</a></pre>
<div class="block">The credentials verifying the account principals.</div>
</li>
</ul>
<a id="credentialsSalt">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>credentialsSalt</h4>
<pre>protected&nbsp;org.apache.shiro.util.ByteSource <a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.54">credentialsSalt</a></pre>
<div class="block">Any salt used in hashing the credentials.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</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>SimpleAuthenticationInfo</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.59">SimpleAuthenticationInfo</a>()</pre>
<div class="block">Default no-argument constructor.</div>
</li>
</ul>
<a id="&lt;init&gt;(java.lang.Object,java.lang.Object,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimpleAuthenticationInfo</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.73">SimpleAuthenticationInfo</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>&nbsp;principal,
<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>&nbsp;credentials,
<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;realmName)</pre>
<div class="block">Constructor that takes in a single 'primary' principal of the account and its corresponding credentials,
associated with the specified realm.
<p/>
This is a convenience constructor and will construct a <a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject"><code>PrincipalCollection</code></a> based
on the <code>principal</code> and <code>realmName</code> argument.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>principal</code> - the 'primary' principal associated with the specified realm.</dd>
<dd><code>credentials</code> - the credentials that verify the given principal.</dd>
<dd><code>realmName</code> - the realm from where the principal and credentials were acquired.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(java.lang.Object,java.lang.Object,org.apache.shiro.util.ByteSource,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimpleAuthenticationInfo</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.92">SimpleAuthenticationInfo</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>&nbsp;principal,
<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>&nbsp;hashedCredentials,
org.apache.shiro.util.ByteSource&nbsp;credentialsSalt,
<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;realmName)</pre>
<div class="block">Constructor that takes in a single 'primary' principal of the account, its corresponding hashed credentials,
the salt used to hash the credentials, and the name of the realm to associate with the principals.
<p/>
This is a convenience constructor and will construct a <a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject"><code>PrincipalCollection</code></a> based
on the <code>principal</code> and <code>realmName</code> argument.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>principal</code> - the 'primary' principal associated with the specified realm.</dd>
<dd><code>hashedCredentials</code> - the hashed credentials that verify the given principal.</dd>
<dd><code>credentialsSalt</code> - the salt used when hashing the given hashedCredentials</dd>
<dd><code>realmName</code> - the realm from where the principal and credentials were acquired.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="credential/HashedCredentialsMatcher.html" title="class in org.apache.shiro.authc.credential"><code>HashedCredentialsMatcher</code></a></dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.shiro.subject.PrincipalCollection,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimpleAuthenticationInfo</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.105">SimpleAuthenticationInfo</a>&#8203;(<a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals,
<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>&nbsp;credentials)</pre>
<div class="block">Constructor that takes in an account's identifying principal(s) and its corresponding credentials that verify
the principals.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>principals</code> - a Realm's account's identifying principal(s)</dd>
<dd><code>credentials</code> - the accounts corresponding principals that verify the principals.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.shiro.subject.PrincipalCollection,java.lang.Object,org.apache.shiro.util.ByteSource)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SimpleAuthenticationInfo</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.120">SimpleAuthenticationInfo</a>&#8203;(<a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals,
<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>&nbsp;hashedCredentials,
org.apache.shiro.util.ByteSource&nbsp;credentialsSalt)</pre>
<div class="block">Constructor that takes in an account's identifying principal(s), hashed credentials used to verify the
principals, and the salt used when hashing the credentials.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>principals</code> - a Realm's account's identifying principal(s)</dd>
<dd><code>hashedCredentials</code> - the hashed credentials that verify the principals.</dd>
<dd><code>credentialsSalt</code> - the salt used when hashing the hashedCredentials.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="credential/HashedCredentialsMatcher.html" title="class in org.apache.shiro.authc.credential"><code>HashedCredentialsMatcher</code></a></dd>
</dl>
</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="getPrincipals()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrincipals</h4>
<pre class="methodSignature">public&nbsp;<a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.127">getPrincipals</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AuthenticationInfo.html#getPrincipals()">AuthenticationInfo</a></code></span></div>
<div class="block">Returns all principals associated with the corresponding Subject. Each principal is an identifying piece of
information useful to the application such as a username, or user id, a given name, etc - anything useful
to the application to identify the current <code>Subject</code>.
<p/>
The returned PrincipalCollection should <em>not</em> contain any credentials used to verify principals, such
as passwords, private keys, etc. Those should be instead returned by <a href="AuthenticationInfo.html#getCredentials()"><code>getCredentials()</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AuthenticationInfo.html#getPrincipals()">getPrincipals</a></code>&nbsp;in interface&nbsp;<code><a href="AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all principals associated with the corresponding Subject.</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/authc/SimpleAuthenticationInfo.html#line.136">setPrincipals</a>&#8203;(<a href="../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a>&nbsp;principals)</pre>
<div class="block">Sets the identifying principal(s) represented by this instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>principals</code> - the indentifying attributes of the corresponding Realm account.</dd>
</dl>
</li>
</ul>
<a id="getCredentials()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCredentials</h4>
<pre class="methodSignature">public&nbsp;<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>&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.140">getCredentials</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AuthenticationInfo.html#getCredentials()">AuthenticationInfo</a></code></span></div>
<div class="block">Returns the credentials associated with the corresponding Subject. A credential verifies one or more of the
<a href="AuthenticationInfo.html#getPrincipals()"><code>principals</code></a> associated with the Subject, such as a password or private key. Credentials
are used by Shiro particularly during the authentication process to ensure that submitted credentials
during a login attempt match exactly the credentials here in the <code>AuthenticationInfo</code> instance.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AuthenticationInfo.html#getCredentials()">getCredentials</a></code>&nbsp;in interface&nbsp;<code><a href="AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the credentials associated with the corresponding Subject.</dd>
</dl>
</li>
</ul>
<a id="setCredentials(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCredentials</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.149">setCredentials</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>&nbsp;credentials)</pre>
<div class="block">Sets the credentials that verify the principals/identity of the associated Realm account.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>credentials</code> - attribute(s) that verify the account's identity/principals, such as a password or private key.</dd>
</dl>
</li>
</ul>
<a id="getCredentialsSalt()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCredentialsSalt</h4>
<pre class="methodSignature">public&nbsp;org.apache.shiro.util.ByteSource&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.166">getCredentialsSalt</a>()</pre>
<div class="block">Returns the salt used to hash the credentials, or <code>null</code> if no salt was used or credentials were not
hashed at all.
<p/>
Note that this attribute is <em>NOT</em> handled in the
<a href="#merge(org.apache.shiro.authc.AuthenticationInfo)"><code>merge</code></a> method - a hash salt is only useful within a single realm (as each
realm will perform it's own Credentials Matching logic), and once finished in that realm, Shiro has no further
use for salts. Therefore it doesn't make sense to 'merge' salts in a multi-realm scenario.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="SaltedAuthenticationInfo.html#getCredentialsSalt()">getCredentialsSalt</a></code>&nbsp;in interface&nbsp;<code><a href="SaltedAuthenticationInfo.html" title="interface in org.apache.shiro.authc">SaltedAuthenticationInfo</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the salt used to hash the credentials, or <code>null</code> if no salt was used or credentials were not
hashed at all.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a id="setCredentialsSalt(org.apache.shiro.util.ByteSource)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCredentialsSalt</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.183">setCredentialsSalt</a>&#8203;(org.apache.shiro.util.ByteSource&nbsp;salt)</pre>
<div class="block">Sets the salt used to hash the credentials, or <code>null</code> if no salt was used or credentials were not
hashed at all.
<p/>
Note that this attribute is <em>NOT</em> handled in the
<a href="#merge(org.apache.shiro.authc.AuthenticationInfo)"><code>merge</code></a> method - a hash salt is only useful within a single realm (as each
realm will perform it's own Credentials Matching logic), and once finished in that realm, Shiro has no further
use for salts. Therefore it doesn't make sense to 'merge' salts in a multi-realm scenario.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>salt</code> - the salt used to hash the credentials, or <code>null</code> if no salt was used or credentials were not
hashed at all.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a id="merge(org.apache.shiro.authc.AuthenticationInfo)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>merge</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.192">merge</a>&#8203;(<a href="AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a>&nbsp;info)</pre>
<div class="block">Takes the specified <code>info</code> argument and adds its principals and credentials into this instance.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="MergableAuthenticationInfo.html#merge(org.apache.shiro.authc.AuthenticationInfo)">merge</a></code>&nbsp;in interface&nbsp;<code><a href="MergableAuthenticationInfo.html" title="interface in org.apache.shiro.authc">MergableAuthenticationInfo</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>info</code> - the <code>AuthenticationInfo</code> to add into this instance.</dd>
</dl>
</li>
</ul>
<a id="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.252">equals</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>&nbsp;o)</pre>
<div class="block">Returns <code>true</code> if the Object argument is an <code>instanceof SimpleAuthenticationInfo</code> and
its <a href="#getPrincipals()"><code>principals</code></a> are equal to this instance's principals, <code>false</code> otherwise.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>o</code> - the object to compare for equality.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the Object argument is an <code>instanceof SimpleAuthenticationInfo</code> and
its <a href="#getPrincipals()"><code>principals</code></a> are equal to this instance's principals, <code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/shiro/authc/SimpleAuthenticationInfo.html#line.269">hashCode</a>()</pre>
<div class="block">Returns the hashcode of the internal <a href="#getPrincipals()"><code>principals</code></a> instance.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the hashcode of the internal <a href="#getPrincipals()"><code>principals</code></a> instance.</dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</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/authc/SimpleAuthenticationInfo.html#line.278">toString</a>()</pre>
<div class="block">Simple implementation that merely returns <code><a href="#getPrincipals()"><code>principals</code></a>.toString()</code></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code><a href="#getPrincipals()"><code>principals</code></a>.toString()</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/SimpleAuthenticationInfo.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>Nested&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>