hunt.shiro.realm.AuthenticatingRealm

Undocumented in source.

Members

Classes

AuthenticatingRealm
class AuthenticatingRealm

A top-level abstract implementation of the <tt>Realm</tt> interface that only implements authentication support (log-in) operations and leaves authorization (access control) behavior to subclasses. <h2>Authentication Caching</h2> For applications that perform frequent repeated authentication of the same accounts (e.g. as is often done in REST or Soap applications that authenticate on every request), it might be prudent to enable authentication caching to alleviate constant load on any back-end data sources. <p/> This feature is disabled by default to retain backwards-compatibility with Shiro 1.1 and earlier. It may be enabled by setting {@link #setAuthenticationCachingEnabled(bool) authenticationCachingEnabled} = {@code true} (and configuring Shiro with a {@link CacheManager} of course), but <b>NOTE:</b> <p/> <b>ONLY enable authentication caching if either of the following is true for your realm implementation:</b> <ul> <li>The {@link #doGetAuthenticationInfo(hunt.shiro.authc.AuthenticationToken) doGetAuthenticationInfo} implementation returns {@code AuthenticationInfo} instances where the {@link hunt.shiro.authc.AuthenticationInfo#getCredentials() credentials} are securely obfuscated and NOT plaintext (raw) credentials. For example, if your realm references accounts with passwords, that the {@code AuthenticationInfo}'s {@link hunt.shiro.authc.AuthenticationInfo#getCredentials() credentials} are safely hashed and salted or otherwise fully encrypted.<br/><br/></li> <li>The {@link #doGetAuthenticationInfo(hunt.shiro.authc.AuthenticationToken) doGetAuthenticationInfo} implementation returns {@code AuthenticationInfo} instances where the {@link hunt.shiro.authc.AuthenticationInfo#getCredentials() credentials} are plaintext (raw) <b>AND</b> the cache region storing the {@code AuthenticationInfo} instances WILL NOT overflow to disk and WILL NOT transmit cache entries over an unprotected (non TLS/SSL) network (as might be the case with a networked/distributed enterprise cache). This should be the case even in private/trusted/corporate networks.</li> </ul> <p/> These points are very important because if authentication caching is enabled, this abstract class implementation will place AuthenticationInfo instances returned from the subclass implementations directly into the cache, for

Meta