Uses of Interface
org.apache.shiro.subject.Subject
-
Packages that use Subject Package Description org.apache.shiro This package primarily exists as a root classpath distinction, but it does contain two core classes widely used by applications,SecurityUtilsandShiroException.org.apache.shiro.aop Components used to support the framework's AOP/interception support classes.org.apache.shiro.concurrent Executor,ExecutorService, andScheduledExecutorServiceimplementations for transparentSubjectassociation with threads in an asynchronous execution environment.org.apache.shiro.mgt Provides the masterSecurityManagerinterface and a default implementation hierarchy for managing all aspects of Shiro's functionality in an application.org.apache.shiro.subject Components supporting theSubjectinterface, the most important concept in Shiro's API.org.apache.shiro.subject.support Concrete support implementations of most of theorg.apache.shiro.subjectinterfaces.org.apache.shiro.util Your run-of-the-mill 'util' package for components and logic widely used across the framework that can't find their home into a proper OO hierarchy (or, most likely for things used across many hierarchies). -
-
Uses of Subject in org.apache.shiro
Methods in org.apache.shiro that return Subject Modifier and Type Method Description static SubjectSecurityUtils. getSubject()Returns the currently accessibleSubjectavailable to the calling code depending on runtime environment. -
Uses of Subject in org.apache.shiro.aop
Methods in org.apache.shiro.aop that return Subject Modifier and Type Method Description protected SubjectAnnotationHandler. getSubject()Returns theSubjectassociated with the currently-executing code.protected SubjectMethodInterceptorSupport. getSubject()Returns theSubjectassociated with the currently-executing code. -
Uses of Subject in org.apache.shiro.concurrent
Methods in org.apache.shiro.concurrent that return Subject Modifier and Type Method Description protected SubjectSubjectAwareExecutor. getSubject()Returns the currently Subject instance that should be associated with Runnable or Callable instances before being dispatched to the targetExecutorinstance. -
Uses of Subject in org.apache.shiro.mgt
Methods in org.apache.shiro.mgt that return Subject Modifier and Type Method Description protected SubjectDefaultSecurityManager. createSubject(AuthenticationToken token, AuthenticationInfo info, Subject existing)Creates aSubjectinstance for the user represented by the given method arguments.SubjectDefaultSecurityManager. createSubject(SubjectContext subjectContext)This implementation functions as follows:SubjectDefaultSubjectFactory. createSubject(SubjectContext context)SubjectSecurityManager. createSubject(SubjectContext context)Creates aSubjectinstance reflecting the specified contextual data.SubjectSubjectFactory. createSubject(SubjectContext context)Creates a new Subject instance reflecting the state of the specified contextual data.protected SubjectDefaultSecurityManager. doCreateSubject(SubjectContext context)Actually creates aSubjectinstance by delegating to the internalsubjectFactory.SubjectDefaultSecurityManager. login(Subject subject, AuthenticationToken token)First authenticates theAuthenticationTokenargument, and if successful, constructs aSubjectinstance representing the authenticated account's identity.SubjectSecurityManager. 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 throwingAuthenticationExceptionif it is not.protected SubjectDefaultSubjectFactory. newSubjectInstance(PrincipalCollection principals, boolean authenticated, String host, Session session, SecurityManager securityManager)Deprecated.since 1.2 - overrideDefaultSubjectFactory.createSubject(org.apache.shiro.subject.SubjectContext)directly if you need to instantiate a customSubjectclass.SubjectDefaultSubjectDAO. save(Subject subject)Saves the subject's state to the subject'ssessiononly ifsessionStorageEnabled(subject).SubjectSubjectDAO. save(Subject subject)Persists the specified Subject's state for later access.Methods in org.apache.shiro.mgt with parameters of type Subject Modifier and Type Method Description protected voidDefaultSecurityManager. beforeLogout(Subject subject)protected voidDefaultSecurityManager. bind(Subject subject)Deprecated.in favor ofsave(subject).protected SubjectDefaultSecurityManager. createSubject(AuthenticationToken token, AuthenticationInfo info, Subject existing)Creates aSubjectinstance for the user represented by the given method arguments.protected voidDefaultSecurityManager. delete(Subject subject)Removes (or 'unbinds') the Subject's state from the application, typically called duringDefaultSecurityManager.logout(org.apache.shiro.subject.Subject)..voidDefaultSubjectDAO. delete(Subject subject)Removes any existing subject state from the subject's session (if the session exists).voidSubjectDAO. delete(Subject subject)Removes any persisted state for the specifiedSubjectinstance.protected abstract voidAbstractRememberMeManager. forgetIdentity(Subject subject)Forgets (removes) any remembered identity data for the specifiedSubjectinstance.protected PrincipalCollectionAbstractRememberMeManager. getIdentityToRemember(Subject subject, AuthenticationInfo info)booleanDefaultSessionStorageEvaluator. isSessionStorageEnabled(Subject subject)This implementation functions as follows: If the specified Subject already has an existingSession(typically because an application developer has calledsubject.getSession()already), Shiro will use that existing session to store subject state. If a Subject does not yet have a Session, this implementation checks thesessionStorageEnabledproperty: IfsessionStorageEnabledis true (the default setting), a new session may be created to persist Subject state if necessary. IfsessionStorageEnabledisfalse, a new session will not be created to persist session state. Most applications use Sessions and are OK with the defaulttruesetting forsessionStorageEnabled.protected booleanDefaultSubjectDAO. isSessionStorageEnabled(Subject subject)Determines if the subject's session will be used to persist subject state or not.booleanSessionStorageEvaluator. isSessionStorageEnabled(Subject subject)Returnstrueif the specifiedSubject'ssessionmay be used to persist that Subject's state,falseotherwise.SubjectDefaultSecurityManager. login(Subject subject, AuthenticationToken token)First authenticates theAuthenticationTokenargument, and if successful, constructs aSubjectinstance representing the authenticated account's identity.SubjectSecurityManager. 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 throwingAuthenticationExceptionif it is not.voidDefaultSecurityManager. logout(Subject subject)voidSecurityManager. logout(Subject subject)Logs out the specified Subject from the system.protected voidDefaultSubjectDAO. mergeAuthenticationState(Subject subject)Merges the Subject's current authentication state with whatever may be in any available session.protected voidDefaultSubjectDAO. mergePrincipals(Subject subject)Merges the Subject's currentgetPrincipals()with whatever may be in any available session.voidAbstractRememberMeManager. onFailedLogin(Subject subject, AuthenticationToken token, AuthenticationException ae)Reacts to a failed login by immediatelyforgettingany previously remembered identity.protected voidDefaultSecurityManager. onFailedLogin(AuthenticationToken token, AuthenticationException ae, Subject subject)voidRememberMeManager. onFailedLogin(Subject subject, AuthenticationToken token, AuthenticationException ae)Reacts to a failed authentication attempt, typically by forgetting any previously remembered principals for the Subject.voidAbstractRememberMeManager. onLogout(Subject subject)Reacts to a subject logging out of the application and immediatelyforgetsany previously stored identity and returns.voidRememberMeManager. onLogout(Subject subject)Reacts to a Subject logging out of the application, typically by forgetting any previously remembered principals for the Subject.voidAbstractRememberMeManager. onSuccessfulLogin(Subject subject, AuthenticationToken token, AuthenticationInfo info)Reacts to the successful login attempt by first alwaysforgettingany previously stored identity.protected voidDefaultSecurityManager. onSuccessfulLogin(AuthenticationToken token, AuthenticationInfo info, Subject subject)voidRememberMeManager. onSuccessfulLogin(Subject subject, AuthenticationToken token, AuthenticationInfo info)Reacts to a successful authentication attempt, typically saving the principals to be retrieved ('remembered') for future system access.voidAbstractRememberMeManager. rememberIdentity(Subject subject, AuthenticationToken token, AuthenticationInfo authcInfo)Remembers a subject-unique identity for retrieval later.protected voidAbstractRememberMeManager. rememberIdentity(Subject subject, PrincipalCollection accountPrincipals)Remembers the specified account principals by firstconvertingthem to a byte array and thenremembersthat byte array.protected voidDefaultSecurityManager. rememberMeFailedLogin(AuthenticationToken token, AuthenticationException ex, Subject subject)protected voidDefaultSecurityManager. rememberMeLogout(Subject subject)protected voidDefaultSecurityManager. rememberMeSuccessfulLogin(AuthenticationToken token, AuthenticationInfo info, Subject subject)protected abstract voidAbstractRememberMeManager. rememberSerializedIdentity(Subject subject, byte[] serialized)Persists the identity bytes to a persistent store for retrieval later via theAbstractRememberMeManager.getRememberedSerializedIdentity(SubjectContext)method.protected voidDefaultSubjectDAO. removeFromSession(Subject subject)Removes any existing subject state from the Subject's session (if the session exists).protected voidDefaultSecurityManager. save(Subject subject)Saves the subject's state to a persistent location for future reference if necessary.SubjectDefaultSubjectDAO. save(Subject subject)Saves the subject's state to the subject'ssessiononly ifsessionStorageEnabled(subject).SubjectSubjectDAO. save(Subject subject)Persists the specified Subject's state for later access.protected voidDefaultSubjectDAO. saveToSession(Subject subject)Saves the subject's state (it's principals and authentication state) to itssession.protected voidDefaultSecurityManager. stopSession(Subject subject)protected voidDefaultSecurityManager. unbind(Subject subject)Deprecated.in Shiro 1.2 in favor ofDefaultSecurityManager.delete(org.apache.shiro.subject.Subject) -
Uses of Subject in org.apache.shiro.subject
Methods in org.apache.shiro.subject that return Subject Modifier and Type Method Description SubjectSubject.Builder. buildSubject()Creates and returns a newSubjectinstance reflecting the cumulative state acquired by the other methods in this class.SubjectSubjectContext. getSubject()Returns any existingSubjectthat may be in use at the time the newSubjectinstance is being created.Methods in org.apache.shiro.subject with parameters of type Subject Modifier and Type Method Description voidSubjectContext. setSubject(Subject subject)Sets the existingSubjectthat may be in use at the time the newSubjectinstance is being created. -
Uses of Subject in org.apache.shiro.subject.support
Classes in org.apache.shiro.subject.support that implement Subject Modifier and Type Class Description classDelegatingSubjectImplementation of theSubjectinterface that delegates method calls to an underlyingSecurityManagerinstance for security checks.Methods in org.apache.shiro.subject.support that return Subject Modifier and Type Method Description SubjectDefaultSubjectContext. getSubject()protected SubjectSubjectThreadState. getSubject()Returns theSubjectinstance managed by thisThreadStateimplementation.Methods in org.apache.shiro.subject.support with parameters of type Subject Modifier and Type Method Description voidDefaultSubjectContext. setSubject(Subject subject)Constructors in org.apache.shiro.subject.support with parameters of type Subject Constructor Description SubjectCallable(Subject subject, Callable<V> delegate)SubjectRunnable(Subject subject, Runnable delegate)Creates a newSubjectRunnablethat, when executed, will execute the targetdelegate, but guarantees that it will run associated with the specifiedSubject.SubjectThreadState(Subject subject)Creates a newSubjectThreadStatethat will bind and unbind the specifiedSubjectto the thread -
Uses of Subject in org.apache.shiro.util
Methods in org.apache.shiro.util that return Subject Modifier and Type Method Description static SubjectThreadContext. getSubject()Convenience method that simplifies retrieval of a thread-bound Subject.static SubjectThreadContext. unbindSubject()Convenience method that simplifies removal of a thread-local Subject from the thread.Methods in org.apache.shiro.util with parameters of type Subject Modifier and Type Method Description static voidThreadContext. bind(Subject subject)Convenience method that simplifies binding a Subject to the ThreadContext.
-