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 these
Realm s). |
org.apache.shiro.cas | |
org.apache.shiro.mgt |
Provides the master
SecurityManager 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 core
Realm 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 the
Subject interface, the most important concept in
Shiro's API. |
org.apache.shiro.subject.support |
Concrete support implementations of most of the
org.apache.shiro.subject interfaces. |
org.apache.shiro.web.filter.authc |
Servlet
Filter implementations specific to controlling access based on a
subject's authentication status, or those that can execute authentications (log-ins) directly. |
Modifier and Type | Class and 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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractAuthenticator.notifyFailure(AuthenticationToken token,
AuthenticationException ae)
Notifies any registered
AuthenticationListener s that
authentication failed for the
specified token which resulted in the specified ae exception. |
void |
AuthenticationListener.onFailure(AuthenticationToken token,
AuthenticationException ae)
Callback triggered when an authentication attempt for a
Subject has failed. |
Modifier and Type | Method and Description |
---|---|
AuthenticationInfo |
Authenticator.authenticate(AuthenticationToken authenticationToken)
Authenticates a user based on the submitted
AuthenticationToken . |
AuthenticationInfo |
AbstractAuthenticator.authenticate(AuthenticationToken token)
Implementation of the
Authenticator interface that functions in the following manner:
Calls template doAuthenticate method for subclass execution of the actual
authentication behavior.
If an AuthenticationException is thrown during doAuthenticate ,
notify any registered
AuthenticationListener s of the exception and then propogate the exception
for the caller to handle.
If no exception is thrown (indicating a successful login),
notify any registered
AuthenticationListener s of the successful attempt.
Return the AuthenticationInfo
|
protected abstract AuthenticationInfo |
AbstractAuthenticator.doAuthenticate(AuthenticationToken token)
Template design pattern hook for subclasses to implement specific authentication behavior.
|
Modifier and Type | Class and Description |
---|---|
class |
UnsupportedTokenException
Exception thrown during the authentication process when an
AuthenticationToken implementation is encountered that is not
supported by one or more configured Realm s. |
Modifier and Type | Method and Description |
---|---|
AuthenticationInfo |
AtLeastOneSuccessfulStrategy.afterAllAttempts(AuthenticationToken token,
AuthenticationInfo aggregate)
Ensures that the
aggregate method argument is not null and
aggregate.
is not null , and if either is null , throws an AuthenticationException to indicate
that none of the realms authenticated successfully. |
AuthenticationInfo |
AbstractAuthenticationStrategy.afterAllAttempts(AuthenticationToken token,
AuthenticationInfo aggregate)
Simply returns the
aggregate argument without modification. |
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-proccessing after all realms have completed.
|
AuthenticationInfo |
AllSuccessfulStrategy.afterAttempt(Realm realm,
AuthenticationToken token,
AuthenticationInfo info,
AuthenticationInfo aggregate,
Throwable t)
Merges the specified
info into the aggregate argument and returns it (just as the
parent implementation does), but additionally ensures the following:
if the Throwable argument is not null , re-throws it to immediately cancel the
authentication process, since this strategy requires all realms to authenticate successfully.
neither the info or aggregate argument is null to ensure that each
realm did in fact authenticate successfully
|
AuthenticationInfo |
AbstractAuthenticationStrategy.afterAttempt(Realm realm,
AuthenticationToken token,
AuthenticationInfo singleRealmInfo,
AuthenticationInfo aggregateInfo,
Throwable t)
Base implementation that will aggregate the specified
singleRealmInfo into the
aggregateInfo and then returns the aggregate. |
AuthenticationInfo |
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 |
FirstSuccessfulStrategy.beforeAllAttempts(Collection<? extends Realm> realms,
AuthenticationToken token)
Returns
null immediately, relying on this class's merge implementation to return
only the first info object it encounters, ignoring all subsequent ones. |
AuthenticationInfo |
AbstractAuthenticationStrategy.beforeAllAttempts(Collection<? extends Realm> realms,
AuthenticationToken token)
Simply returns
new , which supports
aggregating account data across realms. |
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
specified
token - called before any Realm is actually invoked. |
AuthenticationInfo |
AllSuccessfulStrategy.beforeAttempt(Realm realm,
AuthenticationToken token,
AuthenticationInfo info)
Because all realms in this strategy must complete successfully, this implementation ensures that the given
Realm supports the given
token argument. |
AuthenticationInfo |
AbstractAuthenticationStrategy.beforeAttempt(Realm realm,
AuthenticationToken token,
AuthenticationInfo aggregate)
Simply returns the
aggregate method argument, without modification. |
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.
|
protected AuthenticationInfo |
ModularRealmAuthenticator.doAuthenticate(AuthenticationToken authenticationToken)
Attempts to authenticate the given token by iterating over the internal collection of
Realm s. |
Modifier and Type | Class and Description |
---|---|
class |
CasAuthenticationException |
Modifier and Type | Method and Description |
---|---|
protected boolean |
CasFilter.onLoginFailure(AuthenticationToken token,
AuthenticationException ae,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
If login has failed, redirect user to the CAS error page (no ticket or ticket validation failed) except if the user is already
authenticated, in which case redirect to the default success url.
|
Modifier and Type | Method and Description |
---|---|
protected AuthenticationInfo |
CasRealm.doGetAuthenticationInfo(AuthenticationToken token)
Authenticates a user and retrieves its information.
|
Modifier and Type | Method and Description |
---|---|
protected void |
DefaultSecurityManager.onFailedLogin(AuthenticationToken token,
AuthenticationException ae,
Subject subject) |
void |
AbstractRememberMeManager.onFailedLogin(Subject subject,
AuthenticationToken token,
AuthenticationException ae)
Reacts to a failed login by immediately
forgetting any
previously remembered identity. |
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) |
Modifier and Type | Method and Description |
---|---|
AuthenticationInfo |
AuthenticatingSecurityManager.authenticate(AuthenticationToken token)
Delegates to the wrapped
Authenticator for authentication. |
Subject |
DefaultSecurityManager.login(Subject subject,
AuthenticationToken token)
First authenticates the
AuthenticationToken argument, and if successful, constructs a
Subject instance representing the authenticated account's identity. |
Subject |
SecurityManager.login(Subject subject,
AuthenticationToken authenticationToken)
Logs in the specified Subject using the given
authenticationToken , returning an updated Subject
instance reflecting the authenticated state if successful or throwing AuthenticationException if it is
not. |
Modifier and Type | Method and Description |
---|---|
protected void |
AuthenticatingRealm.assertCredentialsMatch(AuthenticationToken token,
AuthenticationInfo info)
Asserts that the submitted
AuthenticationToken 's credentials match the stored account
AuthenticationInfo 's credentials, and if not, throws an AuthenticationException . |
protected AuthenticationInfo |
SimpleAccountRealm.doGetAuthenticationInfo(AuthenticationToken token) |
protected abstract AuthenticationInfo |
AuthenticatingRealm.doGetAuthenticationInfo(AuthenticationToken token)
Retrieves authentication data from an implementation-specific datasource (RDBMS, LDAP, etc) for the given
authentication token.
|
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.
|
AuthenticationInfo |
AuthenticatingRealm.getAuthenticationInfo(AuthenticationToken token)
This implementation functions as follows:
It attempts to acquire any cached
AuthenticationInfo corresponding to the specified
AuthenticationToken argument. |
Modifier and Type | Method and Description |
---|---|
protected AuthenticationInfo |
JdbcRealm.doGetAuthenticationInfo(AuthenticationToken token) |
Modifier and Type | Method and Description |
---|---|
protected AuthenticationInfo |
JndiLdapRealm.doGetAuthenticationInfo(AuthenticationToken token)
Delegates to
JndiLdapRealm.queryForAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken, LdapContextFactory) ,
wrapping any NamingException s in a Shiro AuthenticationException to satisfy the parent method
signature. |
protected AuthenticationInfo |
AbstractLdapRealm.doGetAuthenticationInfo(AuthenticationToken token) |
Modifier and Type | Method and Description |
---|---|
void |
Subject.login(AuthenticationToken token)
Performs a login attempt for this Subject/user.
|
Modifier and Type | Method and Description |
---|---|
void |
DelegatingSubject.login(AuthenticationToken token) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
AuthenticatingFilter.onLoginFailure(AuthenticationToken token,
AuthenticationException e,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
protected boolean |
FormAuthenticationFilter.onLoginFailure(AuthenticationToken token,
AuthenticationException e,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
protected void |
FormAuthenticationFilter.setFailureAttribute(javax.servlet.ServletRequest request,
AuthenticationException ae) |
Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.