Uses of Interface
org.apache.shiro.realm.Realm
Packages that use Realm
Package
Description
Support for PAM, or Pluggable Authentication Modules, which is
the capability to authenticate a user against multiple configurable (pluggable) modules (Shiro
calls these
Realms).Core interfaces and exceptions supporting Authorization (access control).
Concepts used to represent Shiro's aggregate state in an application.
Provides the master
SecurityManager interface and a default implementation
hierarchy for managing all aspects of Shiro's functionality in an application.Components and sub-packages used in supporting the core
Realm interface.Realms that acquire security data from a Microsoft Active Directory.
Realms that acquire security data from an RDBMS (Relational Database Management System) using the
JDBC API.
Support for acquiring Realms from JNDI, particularly useful for configuring Shiro in JEE or EJB environments.
Realms that acquire security data from an LDAP (Lightweight Directory Access Protocol) server
utilizing LDAP/Naming APIs.
Realms that acquire security data from text-based data sources such as
Files or
text streams.-
Uses of Realm in org.apache.shiro.authc.pam
Methods in org.apache.shiro.authc.pam that return types with arguments of type RealmModifier and TypeMethodDescriptionprotected Collection<Realm> ModularRealmAuthenticator.getRealms()Returns the realm(s) used by thisAuthenticatorduring an authentication attempt.Methods in org.apache.shiro.authc.pam with parameters of type RealmModifier and TypeMethodDescriptionAbstractAuthenticationStrategy.afterAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo singleRealmInfo, AuthenticationInfo aggregateInfo, Throwable t) Base implementation that will aggregate the specifiedsingleRealmInfointo theaggregateInfoand then returns the aggregate.AllSuccessfulStrategy.afterAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo info, AuthenticationInfo aggregate, Throwable t) Merges the specifiedinfointo theaggregateargument and returns it (just as the parent implementation does), but additionally ensures the following: if theThrowableargument is notnull, re-throws it to immediately cancel the authentication process, since this strategy requires all realms to authenticate successfully. neither theinfooraggregateargument isnullto ensure that each realm did in fact authenticate successfullyAuthenticationStrategy.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.AbstractAuthenticationStrategy.beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo aggregate) Simply returns theaggregatemethod argument, without modification.AllSuccessfulStrategy.beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo info) Because all realms in this strategy must complete successfully, this implementation ensures that the givenRealmsupportsthe giventokenargument.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.FirstSuccessfulStrategy.beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo aggregate) Throws ShortCircuitIterationException if stopAfterFirstSuccess is set and authentication is successful with a previously consulted realm.protected AuthenticationInfoModularRealmAuthenticator.doSingleRealmAuthentication(Realm realm, AuthenticationToken token) Performs the authentication attempt by interacting with the single configured realm, which is significantly simpler than performing multi-realm logic.Method parameters in org.apache.shiro.authc.pam with type arguments of type RealmModifier and TypeMethodDescriptionAbstractAuthenticationStrategy.beforeAllAttempts(Collection<? extends Realm> realms, AuthenticationToken token) Simply returnsnew, which supports aggregating account data across realms.SimpleAuthenticationInfo();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 anyRealmis actually invoked.FirstSuccessfulStrategy.beforeAllAttempts(Collection<? extends Realm> realms, AuthenticationToken token) Returnsnullimmediately, relying on this class'smergeimplementation to return only the firstinfoobject it encounters, ignoring all subsequent ones.protected AuthenticationInfoModularRealmAuthenticator.doMultiRealmAuthentication(Collection<Realm> realms, AuthenticationToken token) Performs the multi-realm authentication attempt by calling back to aAuthenticationStrategyobject as each realm is consulted forAuthenticationInfofor the specifiedtoken.voidModularRealmAuthenticator.setRealms(Collection<Realm> realms) Sets all realms used by this Authenticator, providing PAM (Pluggable Authentication Module) configuration. -
Uses of Realm in org.apache.shiro.authz
Fields in org.apache.shiro.authz with type parameters of type RealmModifier and TypeFieldDescriptionprotected Collection<Realm> ModularRealmAuthorizer.realmsThe realms to consult during any authorization check.Methods in org.apache.shiro.authz that return types with arguments of type RealmModifier and TypeMethodDescriptionModularRealmAuthorizer.getRealms()Returns the realms wrapped by thisAuthorizerwhich are consulted during an authorization check.Method parameters in org.apache.shiro.authz with type arguments of type RealmModifier and TypeMethodDescriptionvoidModularRealmAuthorizer.setRealms(Collection<Realm> realms) Sets the realms wrapped by thisAuthorizerwhich are consulted during an authorization check.Constructor parameters in org.apache.shiro.authz with type arguments of type RealmModifierConstructorDescriptionModularRealmAuthorizer(Collection<Realm> realms) Constructor that accepts theRealms to consult during an authorization check. -
Uses of Realm in org.apache.shiro.ini
Methods in org.apache.shiro.ini that return RealmModifier and TypeMethodDescriptionprotected RealmIniSecurityManagerFactory.createRealm(org.apache.shiro.config.Ini ini) Deprecated.Creates aRealmfrom the Ini instance containing account data.Method parameters in org.apache.shiro.ini with type arguments of type RealmModifier and TypeMethodDescriptionprotected voidIniSecurityManagerFactory.applyRealmsToSecurityManager(Collection<Realm> realms, SecurityManager securityManager) Deprecated. -
Uses of Realm in org.apache.shiro.mgt
Methods in org.apache.shiro.mgt that return types with arguments of type RealmModifier and TypeMethodDescriptionRealmSecurityManager.getRealms()Returns theRealms managed by this SecurityManager instance.Methods in org.apache.shiro.mgt with parameters of type RealmModifier and TypeMethodDescriptionvoidConvenience method for applications using a single realm that merely wraps the realm in a list and then invokes theRealmSecurityManager.setRealms(java.util.Collection<org.apache.shiro.realm.Realm>)method.Method parameters in org.apache.shiro.mgt with type arguments of type RealmModifier and TypeMethodDescriptionvoidRealmSecurityManager.setRealms(Collection<Realm> realms) Sets the realms managed by this SecurityManager instance.Constructors in org.apache.shiro.mgt with parameters of type RealmModifierConstructorDescriptionDefaultSecurityManager(Realm singleRealm) Supporting constructor for a single-realm application.Constructor parameters in org.apache.shiro.mgt with type arguments of type RealmModifierConstructorDescriptionDefaultSecurityManager(Collection<Realm> realms) Supporting constructor for multiplerealms. -
Uses of Realm in org.apache.shiro.realm
Classes in org.apache.shiro.realm that implement RealmModifier and TypeClassDescriptionclassA top-level abstract implementation of the Realm interface that only implements authentication support (log-in) operations and leaves authorization (access control) behavior to subclasses.classAnAuthorizingRealmextends theAuthenticatingRealm's capabilities by adding Authorization (access control) support.classA very basic abstract extension point for theRealminterface that provides caching support for subclasses.classA simple implementation of theRealminterface that uses a set of configured user accounts and roles to support authentication and authorization.Methods in org.apache.shiro.realm that return types with arguments of type Realm -
Uses of Realm in org.apache.shiro.realm.activedirectory
Classes in org.apache.shiro.realm.activedirectory that implement RealmModifier and TypeClassDescriptionclassARealmthat authenticates with an active directory LDAP server to determine the roles for a particular user. -
Uses of Realm in org.apache.shiro.realm.jdbc
Classes in org.apache.shiro.realm.jdbc that implement RealmModifier and TypeClassDescriptionclassRealm that allows authentication and authorization via JDBC calls. -
Uses of Realm in org.apache.shiro.realm.jndi
Methods in org.apache.shiro.realm.jndi that return types with arguments of type Realm -
Uses of Realm in org.apache.shiro.realm.ldap
Classes in org.apache.shiro.realm.ldap that implement RealmModifier and TypeClassDescriptionclassARealmthat authenticates with an LDAP server to build the Subject for a user.classAn LDAPRealmimplementation utilizing Sun's/Oracle's JNDI API as an LDAP API.classDeprecated. -
Uses of Realm in org.apache.shiro.realm.text
Classes in org.apache.shiro.realm.text that implement RealmModifier and TypeClassDescriptionclassclassATextConfigurationRealmthat defers all logic to the parent class, but just enablesPropertiesbased configuration in addition to the parent class's String configuration.classA SimpleAccountRealm that enables text-based configuration of the initial User, Role, and Permission objects created at startup.
DefaultLdapRealm, this class will be removed prior to 2.0