| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="fr"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Jan 24 17:11:59 CET 2020 --> |
| <title>JdbcRealm (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="JdbcRealm (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}; |
| 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/JdbcRealm.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 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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"> </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> <a href="package-summary.html">org.apache.shiro.realm.jdbc</a></div> |
| <h2 title="Class JdbcRealm" class="title">Class JdbcRealm</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="../CachingRealm.html" title="class in org.apache.shiro.realm">org.apache.shiro.realm.CachingRealm</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../AuthenticatingRealm.html" title="class in org.apache.shiro.realm">org.apache.shiro.realm.AuthenticatingRealm</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../AuthorizingRealm.html" title="class in org.apache.shiro.realm">org.apache.shiro.realm.AuthorizingRealm</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.shiro.realm.jdbc.JdbcRealm</li> |
| </ul> |
| </li> |
| </ul> |
| </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="../../authc/LogoutAware.html" title="interface in org.apache.shiro.authc">LogoutAware</a></code>, <code><a href="../../authz/Authorizer.html" title="interface in org.apache.shiro.authz">Authorizer</a></code>, <code><a href="../../authz/permission/PermissionResolverAware.html" title="interface in org.apache.shiro.authz.permission">PermissionResolverAware</a></code>, <code><a href="../../authz/permission/RolePermissionResolverAware.html" title="interface in org.apache.shiro.authz.permission">RolePermissionResolverAware</a></code>, <code>org.apache.shiro.cache.CacheManagerAware</code>, <code><a href="../Realm.html" title="interface in org.apache.shiro.realm">Realm</a></code>, <code>org.apache.shiro.util.Initializable</code>, <code>org.apache.shiro.util.Nameable</code></dd> |
| </dl> |
| <hr> |
| <pre>public class <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.64">JdbcRealm</a> |
| extends <a href="../AuthorizingRealm.html" title="class in org.apache.shiro.realm">AuthorizingRealm</a></pre> |
| <div class="block">Realm that allows authentication and authorization via JDBC calls. The default queries suggest a potential schema |
| for retrieving the user's password for authentication, and querying for a user's roles and permissions. The |
| default queries can be overridden by setting the query properties of the realm. |
| <p/> |
| If the default implementation |
| of authentication and authorization cannot handle your schema, this class can be subclassed and the |
| appropriate methods overridden. (usually <a href="#doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)"><code>doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)</code></a>, |
| <a href="#getRoleNamesForUser(java.sql.Connection,java.lang.String)"><code>getRoleNamesForUser(java.sql.Connection,String)</code></a>, and/or <a href="#getPermissions(java.sql.Connection,java.lang.String,java.util.Collection)"><code>getPermissions(java.sql.Connection,String,java.util.Collection)</code></a> |
| <p/> |
| This realm supports caching by extending from <a href="../AuthorizingRealm.html" title="class in org.apache.shiro.realm"><code>AuthorizingRealm</code></a>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.2</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> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="JdbcRealm.SaltStyle.html" title="enum in org.apache.shiro.realm.jdbc">JdbcRealm.SaltStyle</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Password hash salt configuration.</div> |
| </td> |
| </tr> |
| </table> |
| </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"> </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/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="#authenticationQuery">authenticationQuery</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql" class="externalLink">DataSource</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSource">dataSource</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected 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="#DEFAULT_AUTHENTICATION_QUERY">DEFAULT_AUTHENTICATION_QUERY</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The default query used to retrieve account data for the user.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected 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="#DEFAULT_PERMISSIONS_QUERY">DEFAULT_PERMISSIONS_QUERY</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The default query used to retrieve permissions that apply to a particular role.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected 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="#DEFAULT_SALTED_AUTHENTICATION_QUERY">DEFAULT_SALTED_AUTHENTICATION_QUERY</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The default query used to retrieve account data for the user when <a href="#saltStyle"><code>saltStyle</code></a> is COLUMN.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected 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="#DEFAULT_USER_ROLES_QUERY">DEFAULT_USER_ROLES_QUERY</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The default query used to retrieve the roles that apply to a user.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#permissionsLookupEnabled">permissionsLookupEnabled</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <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="#permissionsQuery">permissionsQuery</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#saltIsBase64Encoded">saltIsBase64Encoded</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="JdbcRealm.SaltStyle.html" title="enum in org.apache.shiro.realm.jdbc">JdbcRealm.SaltStyle</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#saltStyle">saltStyle</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <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="#userRolesQuery">userRolesQuery</a></span></code></th> |
| <td class="colLast"> </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"> </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()">JdbcRealm</a></span>()</code></th> |
| <td class="colLast"> </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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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>protected <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="#doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)">doGetAuthenticationInfo</a></span>​(<a href="../../authc/AuthenticationToken.html" title="interface in org.apache.shiro.authc">AuthenticationToken</a> token)</code></th> |
| <td class="colLast"> |
| <div class="block">Retrieves authentication data from an implementation-specific datasource (RDBMS, LDAP, etc) for the given |
| authentication token.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../authz/AuthorizationInfo.html" title="interface in org.apache.shiro.authz">AuthorizationInfo</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)">doGetAuthorizationInfo</a></span>​(<a href="../../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a> principals)</code></th> |
| <td class="colLast"> |
| <div class="block">This implementation of the interface expects the principals collection to return a String username keyed off of |
| this realm's <a href="../CachingRealm.html#getName()"><code>name</code></a></div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<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="#getPermissions(java.sql.Connection,java.lang.String,java.util.Collection)">getPermissions</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql" class="externalLink">Connection</a> conn, |
| <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> username, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a><<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>> roleNames)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<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="#getRoleNamesForUser(java.sql.Connection,java.lang.String)">getRoleNamesForUser</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql" class="externalLink">Connection</a> conn, |
| <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> username)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>protected <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="#getSaltForUser(java.lang.String)">getSaltForUser</a></span>​(<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> username)</code></th> |
| <td class="colLast"> </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="#setAuthenticationQuery(java.lang.String)">setAuthenticationQuery</a></span>​(<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> authenticationQuery)</code></th> |
| <td class="colLast"> |
| <div class="block">Overrides the default query used to retrieve a user's password during authentication.</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="#setDataSource(javax.sql.DataSource)">setDataSource</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql" class="externalLink">DataSource</a> dataSource)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the datasource that should be used to retrieve connections used by this realm.</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="#setPermissionsLookupEnabled(boolean)">setPermissionsLookupEnabled</a></span>​(boolean permissionsLookupEnabled)</code></th> |
| <td class="colLast"> |
| <div class="block">Enables lookup of permissions during authorization.</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="#setPermissionsQuery(java.lang.String)">setPermissionsQuery</a></span>​(<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> permissionsQuery)</code></th> |
| <td class="colLast"> |
| <div class="block">Overrides the default query used to retrieve a user's permissions during authorization.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSaltIsBase64Encoded(boolean)">setSaltIsBase64Encoded</a></span>​(boolean saltIsBase64Encoded)</code></th> |
| <td class="colLast"> |
| <div class="block">Makes it possible to switch off base64 encoding of password salt.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSaltStyle(org.apache.shiro.realm.jdbc.JdbcRealm.SaltStyle)">setSaltStyle</a></span>​(<a href="JdbcRealm.SaltStyle.html" title="enum in org.apache.shiro.realm.jdbc">JdbcRealm.SaltStyle</a> saltStyle)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the salt style.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setUserRolesQuery(java.lang.String)">setUserRolesQuery</a></span>​(<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> userRolesQuery)</code></th> |
| <td class="colLast"> |
| <div class="block">Overrides the default query used to retrieve a user's roles during authorization.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.realm.AuthorizingRealm"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.shiro.realm.<a href="../AuthorizingRealm.html" title="class in org.apache.shiro.realm">AuthorizingRealm</a></h3> |
| <code><a href="../AuthorizingRealm.html#afterCacheManagerSet()">afterCacheManagerSet</a>, <a href="../AuthorizingRealm.html#checkPermission(org.apache.shiro.authz.Permission,org.apache.shiro.authz.AuthorizationInfo)">checkPermission</a>, <a href="../AuthorizingRealm.html#checkPermission(org.apache.shiro.subject.PrincipalCollection,java.lang.String)">checkPermission</a>, <a href="../AuthorizingRealm.html#checkPermission(org.apache.shiro.subject.PrincipalCollection,org.apache.shiro.authz.Permission)">checkPermission</a>, <a href="../AuthorizingRealm.html#checkPermissions(java.util.Collection,org.apache.shiro.authz.AuthorizationInfo)">checkPermissions</a>, <a href="../AuthorizingRealm.html#checkPermissions(org.apache.shiro.subject.PrincipalCollection,java.lang.String...)">checkPermissions</a>, <a href="../AuthorizingRealm.html#checkPermissions(org.apache.shiro.subject.PrincipalCollection,java.util.Collection)">checkPermissions</a>, <a href="../AuthorizingRealm.html#checkRole(java.lang.String,org.apache.shiro.authz.AuthorizationInfo)">checkRole</a>, <a href="../AuthorizingRealm.html#checkRole(org.apache.shiro.subject.PrincipalCollection,java.lang.String)">checkRole</a>, <a href="../AuthorizingRealm.html#checkRoles(java.util.Collection,org.apache.shiro.authz.AuthorizationInfo)">checkRoles</a>, <a href="../AuthorizingRealm.html#checkRoles(org.apache.shiro.subject.PrincipalCollection,java.lang.String...)">checkRoles</a>, <a href="../AuthorizingRealm.html#checkRoles(org.apache.shiro.subject.PrincipalCollection,java.util.Collection)">checkRoles</a>, <a href="../AuthorizingRealm.html#clearCachedAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)">clearCachedAuthorizationInfo</a>, <a href="../AuthorizingRealm.html#doClearCache(org.apache.shiro.subject.PrincipalCollection)">doClearCache</a>, <a href="../AuthorizingRealm.html#getAuthorizationCache()">getAuthorizationCache</a>, <a href="../AuthorizingRealm.html#getAuthorizationCacheKey(org.apache.shiro.subject.PrincipalCollection)">getAuthorizationCacheKey</a>, <a href="../AuthorizingRealm.html#getAuthorizationCacheName()">getAuthorizationCacheName</a>, <a href="../AuthorizingRealm.html#getAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)">getAuthorizationInfo</a>, <a href="../AuthorizingRealm.html#getPermissionResolver()">getPermissionResolver</a>, <a href="../AuthorizingRealm.html#getPermissions(org.apache.shiro.authz.AuthorizationInfo)">getPermissions</a>, <a href="../AuthorizingRealm.html#getRolePermissionResolver()">getRolePermissionResolver</a>, <a href="../AuthorizingRealm.html#hasAllRoles(org.apache.shiro.subject.PrincipalCollection,java.util.Collection)">hasAllRoles</a>, <a href="../AuthorizingRealm.html#hasRole(java.lang.String,org.apache.shiro.authz.AuthorizationInfo)">hasRole</a>, <a href="../AuthorizingRealm.html#hasRole(org.apache.shiro.subject.PrincipalCollection,java.lang.String)">hasRole</a>, <a href="../AuthorizingRealm.html#hasRoles(java.util.List,org.apache.shiro.authz.AuthorizationInfo)">hasRoles</a>, <a href="../AuthorizingRealm.html#hasRoles(org.apache.shiro.subject.PrincipalCollection,java.util.List)">hasRoles</a>, <a href="../AuthorizingRealm.html#isAuthorizationCachingEnabled()">isAuthorizationCachingEnabled</a>, <a href="../AuthorizingRealm.html#isPermitted(java.util.List,org.apache.shiro.authz.AuthorizationInfo)">isPermitted</a>, <a href="../AuthorizingRealm.html#isPermitted(org.apache.shiro.authz.Permission,org.apache.shiro.authz.AuthorizationInfo)">isPermitted</a>, <a href="../AuthorizingRealm.html#isPermitted(org.apache.shiro.subject.PrincipalCollection,java.lang.String)">isPermitted</a>, <a href="../AuthorizingRealm.html#isPermitted(org.apache.shiro.subject.PrincipalCollection,java.lang.String...)">isPermitted</a>, <a href="../AuthorizingRealm.html#isPermitted(org.apache.shiro.subject.PrincipalCollection,java.util.List)">isPermitted</a>, <a href="../AuthorizingRealm.html#isPermitted(org.apache.shiro.subject.PrincipalCollection,org.apache.shiro.authz.Permission)">isPermitted</a>, <a href="../AuthorizingRealm.html#isPermittedAll(java.util.Collection,org.apache.shiro.authz.AuthorizationInfo)">isPermittedAll</a>, <a href="../AuthorizingRealm.html#isPermittedAll(org.apache.shiro.subject.PrincipalCollection,java.lang.String...)">isPermittedAll</a>, <a href="../AuthorizingRealm.html#isPermittedAll(org.apache.shiro.subject.PrincipalCollection,java.util.Collection)">isPermittedAll</a>, <a href="../AuthorizingRealm.html#onInit()">onInit</a>, <a href="../AuthorizingRealm.html#setAuthorizationCache(org.apache.shiro.cache.Cache)">setAuthorizationCache</a>, <a href="../AuthorizingRealm.html#setAuthorizationCacheName(java.lang.String)">setAuthorizationCacheName</a>, <a href="../AuthorizingRealm.html#setAuthorizationCachingEnabled(boolean)">setAuthorizationCachingEnabled</a>, <a href="../AuthorizingRealm.html#setName(java.lang.String)">setName</a>, <a href="../AuthorizingRealm.html#setPermissionResolver(org.apache.shiro.authz.permission.PermissionResolver)">setPermissionResolver</a>, <a href="../AuthorizingRealm.html#setRolePermissionResolver(org.apache.shiro.authz.permission.RolePermissionResolver)">setRolePermissionResolver</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.realm.AuthenticatingRealm"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.shiro.realm.<a href="../AuthenticatingRealm.html" title="class in org.apache.shiro.realm">AuthenticatingRealm</a></h3> |
| <code><a href="../AuthenticatingRealm.html#assertCredentialsMatch(org.apache.shiro.authc.AuthenticationToken,org.apache.shiro.authc.AuthenticationInfo)">assertCredentialsMatch</a>, <a href="../AuthenticatingRealm.html#clearCachedAuthenticationInfo(org.apache.shiro.subject.PrincipalCollection)">clearCachedAuthenticationInfo</a>, <a href="../AuthenticatingRealm.html#getAuthenticationCache()">getAuthenticationCache</a>, <a href="../AuthenticatingRealm.html#getAuthenticationCacheKey(org.apache.shiro.authc.AuthenticationToken)">getAuthenticationCacheKey</a>, <a href="../AuthenticatingRealm.html#getAuthenticationCacheKey(org.apache.shiro.subject.PrincipalCollection)">getAuthenticationCacheKey</a>, <a href="../AuthenticatingRealm.html#getAuthenticationCacheName()">getAuthenticationCacheName</a>, <a href="../AuthenticatingRealm.html#getAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)">getAuthenticationInfo</a>, <a href="../AuthenticatingRealm.html#getAuthenticationTokenClass()">getAuthenticationTokenClass</a>, <a href="../AuthenticatingRealm.html#getCredentialsMatcher()">getCredentialsMatcher</a>, <a href="../AuthenticatingRealm.html#init()">init</a>, <a href="../AuthenticatingRealm.html#isAuthenticationCachingEnabled()">isAuthenticationCachingEnabled</a>, <a href="../AuthenticatingRealm.html#isAuthenticationCachingEnabled(org.apache.shiro.authc.AuthenticationToken,org.apache.shiro.authc.AuthenticationInfo)">isAuthenticationCachingEnabled</a>, <a href="../AuthenticatingRealm.html#setAuthenticationCache(org.apache.shiro.cache.Cache)">setAuthenticationCache</a>, <a href="../AuthenticatingRealm.html#setAuthenticationCacheName(java.lang.String)">setAuthenticationCacheName</a>, <a href="../AuthenticatingRealm.html#setAuthenticationCachingEnabled(boolean)">setAuthenticationCachingEnabled</a>, <a href="../AuthenticatingRealm.html#setAuthenticationTokenClass(java.lang.Class)">setAuthenticationTokenClass</a>, <a href="../AuthenticatingRealm.html#setCredentialsMatcher(org.apache.shiro.authc.credential.CredentialsMatcher)">setCredentialsMatcher</a>, <a href="../AuthenticatingRealm.html#supports(org.apache.shiro.authc.AuthenticationToken)">supports</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.realm.CachingRealm"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.shiro.realm.<a href="../CachingRealm.html" title="class in org.apache.shiro.realm">CachingRealm</a></h3> |
| <code><a href="../CachingRealm.html#clearCache(org.apache.shiro.subject.PrincipalCollection)">clearCache</a>, <a href="../CachingRealm.html#getAvailablePrincipal(org.apache.shiro.subject.PrincipalCollection)">getAvailablePrincipal</a>, <a href="../CachingRealm.html#getCacheManager()">getCacheManager</a>, <a href="../CachingRealm.html#getName()">getName</a>, <a href="../CachingRealm.html#isCachingEnabled()">isCachingEnabled</a>, <a href="../CachingRealm.html#onLogout(org.apache.shiro.subject.PrincipalCollection)">onLogout</a>, <a href="../CachingRealm.html#setCacheManager(org.apache.shiro.cache.CacheManager)">setCacheManager</a>, <a href="../CachingRealm.html#setCachingEnabled(boolean)">setCachingEnabled</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 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.org.apache.shiro.util.Initializable"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.shiro.util.Initializable</h3> |
| <code>init</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="DEFAULT_AUTHENTICATION_QUERY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_AUTHENTICATION_QUERY</h4> |
| <pre>protected static final <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/realm/jdbc/JdbcRealm.html#line.74">DEFAULT_AUTHENTICATION_QUERY</a></pre> |
| <div class="block">The default query used to retrieve account data for the user.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.shiro.realm.jdbc.JdbcRealm.DEFAULT_AUTHENTICATION_QUERY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="DEFAULT_SALTED_AUTHENTICATION_QUERY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_SALTED_AUTHENTICATION_QUERY</h4> |
| <pre>protected static final <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/realm/jdbc/JdbcRealm.html#line.79">DEFAULT_SALTED_AUTHENTICATION_QUERY</a></pre> |
| <div class="block">The default query used to retrieve account data for the user when <a href="#saltStyle"><code>saltStyle</code></a> is COLUMN.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.shiro.realm.jdbc.JdbcRealm.DEFAULT_SALTED_AUTHENTICATION_QUERY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="DEFAULT_USER_ROLES_QUERY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_USER_ROLES_QUERY</h4> |
| <pre>protected static final <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/realm/jdbc/JdbcRealm.html#line.84">DEFAULT_USER_ROLES_QUERY</a></pre> |
| <div class="block">The default query used to retrieve the roles that apply to a user.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.shiro.realm.jdbc.JdbcRealm.DEFAULT_USER_ROLES_QUERY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="DEFAULT_PERMISSIONS_QUERY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_PERMISSIONS_QUERY</h4> |
| <pre>protected static final <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/realm/jdbc/JdbcRealm.html#line.89">DEFAULT_PERMISSIONS_QUERY</a></pre> |
| <div class="block">The default query used to retrieve permissions that apply to a particular role.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.shiro.realm.jdbc.JdbcRealm.DEFAULT_PERMISSIONS_QUERY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="dataSource"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dataSource</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql" class="externalLink">DataSource</a> <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.106">dataSource</a></pre> |
| </li> |
| </ul> |
| <a id="authenticationQuery"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>authenticationQuery</h4> |
| <pre>protected <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/realm/jdbc/JdbcRealm.html#line.108">authenticationQuery</a></pre> |
| </li> |
| </ul> |
| <a id="userRolesQuery"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>userRolesQuery</h4> |
| <pre>protected <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/realm/jdbc/JdbcRealm.html#line.110">userRolesQuery</a></pre> |
| </li> |
| </ul> |
| <a id="permissionsQuery"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>permissionsQuery</h4> |
| <pre>protected <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/realm/jdbc/JdbcRealm.html#line.112">permissionsQuery</a></pre> |
| </li> |
| </ul> |
| <a id="permissionsLookupEnabled"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>permissionsLookupEnabled</h4> |
| <pre>protected boolean <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.114">permissionsLookupEnabled</a></pre> |
| </li> |
| </ul> |
| <a id="saltStyle"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>saltStyle</h4> |
| <pre>protected <a href="JdbcRealm.SaltStyle.html" title="enum in org.apache.shiro.realm.jdbc">JdbcRealm.SaltStyle</a> <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.116">saltStyle</a></pre> |
| </li> |
| </ul> |
| <a id="saltIsBase64Encoded"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>saltIsBase64Encoded</h4> |
| <pre>protected boolean <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.118">saltIsBase64Encoded</a></pre> |
| </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="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>JdbcRealm</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.64">JdbcRealm</a>()</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="setDataSource(javax.sql.DataSource)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDataSource</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.133">setDataSource</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql" class="externalLink">DataSource</a> dataSource)</pre> |
| <div class="block">Sets the datasource that should be used to retrieve connections used by this realm.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dataSource</code> - the SQL data source.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setAuthenticationQuery(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAuthenticationQuery</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.147">setAuthenticationQuery</a>​(<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> authenticationQuery)</pre> |
| <div class="block">Overrides the default query used to retrieve a user's password during authentication. When using the default |
| implementation, this query must take the user's username as a single parameter and return a single result |
| with the user's password as the first column. If you require a solution that does not match this query |
| structure, you can override <a href="#doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)"><code>doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)</code></a> or |
| just <a href="#getPasswordForUser(java.sql.Connection,java.lang.String)"><code>getPasswordForUser(java.sql.Connection,String)</code></a></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>authenticationQuery</code> - the query to use for authentication.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#DEFAULT_AUTHENTICATION_QUERY"><code>DEFAULT_AUTHENTICATION_QUERY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setUserRolesQuery(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setUserRolesQuery</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.161">setUserRolesQuery</a>​(<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> userRolesQuery)</pre> |
| <div class="block">Overrides the default query used to retrieve a user's roles during authorization. When using the default |
| implementation, this query must take the user's username as a single parameter and return a row |
| per role with a single column containing the role name. If you require a solution that does not match this query |
| structure, you can override <a href="#doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)"><code>doGetAuthorizationInfo(PrincipalCollection)</code></a> or just |
| <a href="#getRoleNamesForUser(java.sql.Connection,java.lang.String)"><code>getRoleNamesForUser(java.sql.Connection,String)</code></a></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>userRolesQuery</code> - the query to use for retrieving a user's roles.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#DEFAULT_USER_ROLES_QUERY"><code>DEFAULT_USER_ROLES_QUERY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setPermissionsQuery(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPermissionsQuery</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.180">setPermissionsQuery</a>​(<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> permissionsQuery)</pre> |
| <div class="block">Overrides the default query used to retrieve a user's permissions during authorization. When using the default |
| implementation, this query must take a role name as the single parameter and return a row |
| per permission with a single column, containing the permission. |
| If you require a solution that does not match this query |
| structure, you can override <a href="#doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)"><code>doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)</code></a> or just |
| <a href="#getPermissions(java.sql.Connection,java.lang.String,java.util.Collection)"><code>getPermissions(java.sql.Connection,String,java.util.Collection)</code></a></p> |
| <p/> |
| <b>Permissions are only retrieved if you set <a href="#permissionsLookupEnabled"><code>permissionsLookupEnabled</code></a> to true. Otherwise, |
| this query is ignored.</b></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>permissionsQuery</code> - the query to use for retrieving permissions for a role.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#DEFAULT_PERMISSIONS_QUERY"><code>DEFAULT_PERMISSIONS_QUERY</code></a>, |
| <a href="#setPermissionsLookupEnabled(boolean)"><code>setPermissionsLookupEnabled(boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setPermissionsLookupEnabled(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPermissionsLookupEnabled</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.191">setPermissionsLookupEnabled</a>​(boolean permissionsLookupEnabled)</pre> |
| <div class="block">Enables lookup of permissions during authorization. The default is "false" - meaning that only roles |
| are associated with a user. Set this to true in order to lookup roles <b>and</b> permissions.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>permissionsLookupEnabled</code> - true if permissions should be looked up during authorization, or false if only |
| roles should be looked up.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setSaltStyle(org.apache.shiro.realm.jdbc.JdbcRealm.SaltStyle)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSaltStyle</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.200">setSaltStyle</a>​(<a href="JdbcRealm.SaltStyle.html" title="enum in org.apache.shiro.realm.jdbc">JdbcRealm.SaltStyle</a> saltStyle)</pre> |
| <div class="block">Sets the salt style. See <a href="#saltStyle"><code>saltStyle</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>saltStyle</code> - new SaltStyle to set.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setSaltIsBase64Encoded(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSaltIsBase64Encoded</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.214">setSaltIsBase64Encoded</a>​(boolean saltIsBase64Encoded)</pre> |
| <div class="block">Makes it possible to switch off base64 encoding of password salt. |
| The default value is true, ie. expect the salt from a string |
| value in a database to be base64 encoded.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>saltIsBase64Encoded</code> - the saltIsBase64Encoded to set</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doGetAuthenticationInfo</h4> |
| <pre class="methodSignature">protected <a href="../../authc/AuthenticationInfo.html" title="interface in org.apache.shiro.authc">AuthenticationInfo</a> <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.222">doGetAuthenticationInfo</a>​(<a href="../../authc/AuthenticationToken.html" title="interface in org.apache.shiro.authc">AuthenticationToken</a> token) |
| throws <a href="../../authc/AuthenticationException.html" title="class in org.apache.shiro.authc">AuthenticationException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../AuthenticatingRealm.html#doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)">AuthenticatingRealm</a></code></span></div> |
| <div class="block">Retrieves authentication data from an implementation-specific datasource (RDBMS, LDAP, etc) for the given |
| authentication token. |
| <p/> |
| For most datasources, this means just 'pulling' authentication data for an associated subject/user and nothing |
| more and letting Shiro do the rest. But in some systems, this method could actually perform EIS specific |
| log-in logic in addition to just retrieving data - it is up to the Realm implementation. |
| <p/> |
| A <code>null</code> return value means that no account could be associated with the specified token.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../AuthenticatingRealm.html#doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)">doGetAuthenticationInfo</a></code> in class <code><a href="../AuthenticatingRealm.html" title="class in org.apache.shiro.realm">AuthenticatingRealm</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>token</code> - the authentication token containing the user's principal and credentials.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an <a href="../../authc/AuthenticationInfo.html" title="interface in org.apache.shiro.authc"><code>AuthenticationInfo</code></a> object containing account data resulting from the |
| authentication ONLY if the lookup is successful (i.e. account exists and is valid, etc.)</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../authc/AuthenticationException.html" title="class in org.apache.shiro.authc">AuthenticationException</a></code> - if there is an error acquiring data or performing |
| realm-specific authentication logic for the specified <tt>token</tt></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doGetAuthorizationInfo</h4> |
| <pre class="methodSignature">protected <a href="../../authz/AuthorizationInfo.html" title="interface in org.apache.shiro.authz">AuthorizationInfo</a> <a href="../../../../../src-html/org/apache/shiro/realm/jdbc/JdbcRealm.html#line.340">doGetAuthorizationInfo</a>​(<a href="../../subject/PrincipalCollection.html" title="interface in org.apache.shiro.subject">PrincipalCollection</a> principals)</pre> |
| <div class="block">This implementation of the interface expects the principals collection to return a String username keyed off of |
| this realm's <a href="../CachingRealm.html#getName()"><code>name</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../AuthorizingRealm.html#doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)">doGetAuthorizationInfo</a></code> in class <code><a href="../AuthorizingRealm.html" title="class in org.apache.shiro.realm">AuthorizingRealm</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>principals</code> - the primary identifying principals of the AuthorizationInfo that should be retrieved.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the AuthorizationInfo associated with this principals.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../AuthorizingRealm.html#getAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)"><code>AuthorizingRealm.getAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getRoleNamesForUser(java.sql.Connection,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRoleNamesForUser</h4> |
| <pre class="methodSignature">protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<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/realm/jdbc/JdbcRealm.html#line.380">getRoleNamesForUser</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql" class="externalLink">Connection</a> conn, |
| <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> username) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql" class="externalLink">SQLException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql" class="externalLink">SQLException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getPermissions(java.sql.Connection,java.lang.String,java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPermissions</h4> |
| <pre class="methodSignature">protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<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/realm/jdbc/JdbcRealm.html#line.412">getPermissions</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql" class="externalLink">Connection</a> conn, |
| <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> username, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a><<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>> roleNames) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql" class="externalLink">SQLException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql" class="externalLink">SQLException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSaltForUser(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getSaltForUser</h4> |
| <pre class="methodSignature">protected <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/realm/jdbc/JdbcRealm.html#line.447">getSaltForUser</a>​(<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> username)</pre> |
| </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/JdbcRealm.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 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 © 2004–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |