public interface AuthenticationPolicy
AuthenticationPolicy customizes the behavior of the AuthenticationFilter, such as whether or not
authentication is required or how to represent trusted/known Subject identities.
Most will find customizing properties on the DefaultAuthenticationPolicy easier than implementing this
interface directly.DefaultAuthenticationPolicy| Modifier and Type | Method and Description |
|---|---|
void |
customizeSubject(org.apache.shiro.subject.Subject.Builder subjectBuilder,
ConnectionReference ref)
Allows customization of the
Subject being built for the specified client
connection. |
boolean |
isAuthenticationRequired(SubjectConnectionReference ref)
Returns
true if the connection's Subject instance should be authenticated, false otherwise. |
void customizeSubject(org.apache.shiro.subject.Subject.Builder subjectBuilder, ConnectionReference ref)
Subject being built for the specified client
connection. This allows for any pre-existing connection-specific identity or state to be applied to the
Subject.Builder before the Subject instance is actually created.
NOTE: This method is called by the SubjectFilter before the filter chain
is executed (and before an authentication attempt occurs). Implementations MUST NOT
attempt to actually build the subject or perform
an authentication attempt in this method.subjectBuilder - the builder for the Subject that will be created representing the associated client connectionref - a reference to the client's connection metadataSubjectFilterboolean isAuthenticationRequired(SubjectConnectionReference ref)
true if the connection's Subject instance should be authenticated, false otherwise.ref - the subject's connectiontrue if the connection's Subject instance should be authenticated, false otherwise.Copyright © 2005–2015 FuseSource, Corp.. All rights reserved.