Uses of Class
org.apache.shiro.authc.AuthenticationException
-
Packages that use AuthenticationException Package Description org.apache.shiro.authc Core interfaces and exceptions concerning Authentication (the act of logging-in).org.apache.shiro.authc.pam Support for PAM, or Pluggable Authentication Modules, which is the capability to authenticate a user against multiple configurable (pluggable) modules (Shiro calls theseRealm
s).org.apache.shiro.mgt Provides the masterSecurityManager
interface and a default implementation hierarchy for managing all aspects of Shiro's functionality in an application.org.apache.shiro.realm Components and sub-packages used in supporting the coreRealm
interface.org.apache.shiro.realm.jdbc Realms that acquire security data from an RDBMS (Relational Database Management System) using the JDBC API.org.apache.shiro.realm.ldap Realms that acquire security data from an LDAP (Lightweight Directory Access Protocol) server utilizing LDAP/Naming APIs.org.apache.shiro.subject Components supporting theSubject
interface, the most important concept in Shiro's API.org.apache.shiro.subject.support Concrete support implementations of most of theorg.apache.shiro.subject
interfaces. -
-
Uses of AuthenticationException in org.apache.shiro.authc
Subclasses of AuthenticationException in org.apache.shiro.authc Modifier and Type Class Description class
AccountException
Exception thrown due to a problem with the account under which an authentication attempt is being executed.class
ConcurrentAccessException
Thrown when an authentication attempt has been received for an account that has already been authenticated (i.e.class
CredentialsException
Exception thrown due to a problem with the credential(s) submitted for an account during the authentication process.class
DisabledAccountException
Thrown when attempting to authenticate and the corresponding account has been disabled for some reason.class
ExcessiveAttemptsException
Thrown when a system is configured to only allow a certain number of authentication attempts over a period of time and the current session has failed to authenticate successfully within that number.class
ExpiredCredentialsException
Thrown during the authentication process when the system determines the submitted credential(s) has expired and will not allow login.class
IncorrectCredentialsException
Thrown when attempting to authenticate with credential(s) that do not match the actual credentials associated with the account principal.class
LockedAccountException
A special kind of DisabledAccountException, this exception is thrown when attempting to authenticate and the corresponding account has been disabled explicitly due to being locked.class
UnknownAccountException
Thrown when attempting to authenticate with a principal that doesn't exist in the system (e.g.Methods in org.apache.shiro.authc with parameters of type AuthenticationException Modifier and Type Method Description protected void
AbstractAuthenticator. notifyFailure(AuthenticationToken token, AuthenticationException ae)
Notifies any registeredAuthenticationListener
s that authentication failed for the specifiedtoken
which resulted in the specifiedae
exception.void
AuthenticationListener. onFailure(AuthenticationToken token, AuthenticationException ae)
Callback triggered when an authentication attempt for aSubject
has failed.Methods in org.apache.shiro.authc that throw AuthenticationException Modifier and Type Method Description AuthenticationInfo
AbstractAuthenticator. authenticate(AuthenticationToken token)
Implementation of theAuthenticator
interface that functions in the following manner: Calls templatedoAuthenticate
method for subclass execution of the actual authentication behavior. If anAuthenticationException
is thrown duringdoAuthenticate
,notify
any registeredAuthenticationListener
s of the exception and then propagate the exception for the caller to handle. If no exception is thrown (indicating a successful login),notify
any registeredAuthenticationListener
s of the successful attempt. Return theAuthenticationInfo
AuthenticationInfo
Authenticator. authenticate(AuthenticationToken authenticationToken)
Authenticates a user based on the submittedAuthenticationToken
.protected abstract AuthenticationInfo
AbstractAuthenticator. doAuthenticate(AuthenticationToken token)
Template design pattern hook for subclasses to implement specific authentication behavior. -
Uses of AuthenticationException in org.apache.shiro.authc.pam
Subclasses of AuthenticationException in org.apache.shiro.authc.pam Modifier and Type Class Description class
ShortCircuitIterationException
Exception thrown during the authentication process usingFirstSuccessfulStrategy
, withstopAfterFirstSuccess
set.class
UnsupportedTokenException
Exception thrown during the authentication process when anAuthenticationToken
implementation is encountered that is not supported by one or more configuredRealm
s.Methods in org.apache.shiro.authc.pam that throw AuthenticationException Modifier and Type Method Description AuthenticationInfo
AbstractAuthenticationStrategy. afterAllAttempts(AuthenticationToken token, AuthenticationInfo aggregate)
Simply returns theaggregate
argument without modification.AuthenticationInfo
AtLeastOneSuccessfulStrategy. afterAllAttempts(AuthenticationToken token, AuthenticationInfo aggregate)
Ensures that theaggregate
method argument is notnull
andaggregate.
is notgetPrincipals()
null
, and if either isnull
, throws an AuthenticationException to indicate that none of the realms authenticated successfully.AuthenticationInfo
AuthenticationStrategy. afterAllAttempts(AuthenticationToken token, AuthenticationInfo aggregate)
Method invoked by the ModularAuthenticator signifying that all of its configured Realms have been consulted for account data, allowing post-processing after all realms have completed.AuthenticationInfo
AbstractAuthenticationStrategy. afterAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo singleRealmInfo, AuthenticationInfo aggregateInfo, Throwable t)
Base implementation that will aggregate the specifiedsingleRealmInfo
into theaggregateInfo
and then returns the aggregate.AuthenticationInfo
AllSuccessfulStrategy. afterAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo info, AuthenticationInfo aggregate, Throwable t)
Merges the specifiedinfo
into theaggregate
argument and returns it (just as the parent implementation does), but additionally ensures the following: if theThrowable
argument is notnull
, re-throws it to immediately cancel the authentication process, since this strategy requires all realms to authenticate successfully. neither theinfo
oraggregate
argument isnull
to ensure that each realm did in fact authenticate successfullyAuthenticationInfo
AuthenticationStrategy. afterAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo singleRealmInfo, AuthenticationInfo aggregateInfo, Throwable t)
Method invoked by the ModularAuthenticator just after the given realm has been consulted for authentication, allowing post-authentication-attempt logic for that realm only.AuthenticationInfo
AbstractAuthenticationStrategy. beforeAllAttempts(Collection<? extends Realm> realms, AuthenticationToken token)
Simply returnsnew
, which supports aggregating account data across realms.SimpleAuthenticationInfo
();AuthenticationInfo
AuthenticationStrategy. beforeAllAttempts(Collection<? extends Realm> realms, AuthenticationToken token)
Method invoked by the ModularAuthenticator signifying that the authentication process is about to begin for the specifiedtoken
- called before anyRealm
is actually invoked.AuthenticationInfo
FirstSuccessfulStrategy. beforeAllAttempts(Collection<? extends Realm> realms, AuthenticationToken token)
Returnsnull
immediately, relying on this class'smerge
implementation to return only the firstinfo
object it encounters, ignoring all subsequent ones.AuthenticationInfo
AbstractAuthenticationStrategy. beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo aggregate)
Simply returns theaggregate
method argument, without modification.AuthenticationInfo
AllSuccessfulStrategy. beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo info)
Because all realms in this strategy must complete successfully, this implementation ensures that the givenRealm
supports
the giventoken
argument.AuthenticationInfo
AuthenticationStrategy. beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo aggregate)
Method invoked by the ModularAuthenticator just prior to the realm being consulted for account data, allowing pre-authentication-attempt logic for that realm only.AuthenticationInfo
FirstSuccessfulStrategy. beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo aggregate)
Throws ShortCircuitIterationException if stopAfterFirstSuccess is set and authentication is successful with a previously consulted realm.protected AuthenticationInfo
ModularRealmAuthenticator. doAuthenticate(AuthenticationToken authenticationToken)
Attempts to authenticate the given token by iterating over the internal collection ofRealm
s. -
Uses of AuthenticationException in org.apache.shiro.mgt
Methods in org.apache.shiro.mgt with parameters of type AuthenticationException Modifier and Type Method Description void
AbstractRememberMeManager. onFailedLogin(Subject subject, AuthenticationToken token, AuthenticationException ae)
Reacts to a failed login by immediatelyforgetting
any previously remembered identity.protected void
DefaultSecurityManager. onFailedLogin(AuthenticationToken token, AuthenticationException ae, Subject subject)
void
RememberMeManager. onFailedLogin(Subject subject, AuthenticationToken token, AuthenticationException ae)
Reacts to a failed authentication attempt, typically by forgetting any previously remembered principals for the Subject.protected void
DefaultSecurityManager. rememberMeFailedLogin(AuthenticationToken token, AuthenticationException ex, Subject subject)
Methods in org.apache.shiro.mgt that throw AuthenticationException Modifier and Type Method Description AuthenticationInfo
AuthenticatingSecurityManager. authenticate(AuthenticationToken token)
Delegates to the wrappedAuthenticator
for authentication.Subject
DefaultSecurityManager. login(Subject subject, AuthenticationToken token)
First authenticates theAuthenticationToken
argument, and if successful, constructs aSubject
instance representing the authenticated account's identity.Subject
SecurityManager. login(Subject subject, AuthenticationToken authenticationToken)
Logs in the specified Subject using the givenauthenticationToken
, returning an updated Subject instance reflecting the authenticated state if successful or throwingAuthenticationException
if it is not. -
Uses of AuthenticationException in org.apache.shiro.realm
Methods in org.apache.shiro.realm that throw AuthenticationException Modifier and Type Method Description protected void
AuthenticatingRealm. assertCredentialsMatch(AuthenticationToken token, AuthenticationInfo info)
Asserts that the submittedAuthenticationToken
's credentials match the stored accountAuthenticationInfo
's credentials, and if not, throws anAuthenticationException
.protected abstract AuthenticationInfo
AuthenticatingRealm. doGetAuthenticationInfo(AuthenticationToken token)
Retrieves authentication data from an implementation-specific datasource (RDBMS, LDAP, etc) for the given authentication token.protected AuthenticationInfo
SimpleAccountRealm. doGetAuthenticationInfo(AuthenticationToken token)
AuthenticationInfo
AuthenticatingRealm. getAuthenticationInfo(AuthenticationToken token)
This implementation functions as follows: It attempts to acquire any cachedAuthenticationInfo
corresponding to the specifiedAuthenticationToken
argument.AuthenticationInfo
Realm. getAuthenticationInfo(AuthenticationToken token)
Returns an account's authentication-specific information for the specified token, or null if no account could be found based on the token. -
Uses of AuthenticationException in org.apache.shiro.realm.jdbc
Methods in org.apache.shiro.realm.jdbc that throw AuthenticationException Modifier and Type Method Description protected AuthenticationInfo
JdbcRealm. doGetAuthenticationInfo(AuthenticationToken token)
-
Uses of AuthenticationException in org.apache.shiro.realm.ldap
Methods in org.apache.shiro.realm.ldap that throw AuthenticationException Modifier and Type Method Description protected AuthenticationInfo
AbstractLdapRealm. doGetAuthenticationInfo(AuthenticationToken token)
protected AuthenticationInfo
DefaultLdapRealm. doGetAuthenticationInfo(AuthenticationToken token)
Delegates toDefaultLdapRealm.queryForAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken, LdapContextFactory)
, wrapping anyNamingException
s in a ShiroAuthenticationException
to satisfy the parent method signature. -
Uses of AuthenticationException in org.apache.shiro.subject
Methods in org.apache.shiro.subject that throw AuthenticationException Modifier and Type Method Description void
Subject. login(AuthenticationToken token)
Performs a login attempt for this Subject/user. -
Uses of AuthenticationException in org.apache.shiro.subject.support
Methods in org.apache.shiro.subject.support that throw AuthenticationException Modifier and Type Method Description void
DelegatingSubject. login(AuthenticationToken token)
-