|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.seam.faces.view.config.SecurityPhaseListener
@Requires(value="org.jboss.seam.security.extension.SecurityExtension") public class SecurityPhaseListener
Use the annotations stored in the ViewConfigStore to restrict view access. Authorization is delegated to Seam Security through by firing a AuthorizationCheckEvent.
| Constructor Summary | |
|---|---|
SecurityPhaseListener()
|
|
| Method Summary | |
|---|---|
PhaseIdType[] |
getDefaultPhases(String viewId)
Get the default phases at which restrictions should be applied, by looking for a @RestrictAtPhase on a matching |
Method |
getRestrictAtViewMethod(Annotation annotation)
Utility method to extract the "restrictAtPhase" method from an annotation |
PhaseIdType[] |
getRestrictedPhaseIds(Method restrictAtViewMethod,
Annotation annotation)
Retrieve the default PhaseIdTypes defined by the restrictAtViewMethod in the annotation |
List<? extends Annotation> |
getRestrictionsForPhase(PhaseIdType currentPhase,
String viewId)
Retrieve all annotations from the ViewConfigStore for a given a JSF phase, and a view id, and where the annotation is qualified by @SecurityBindingType |
boolean |
isAnnotationApplicableToPhase(Annotation annotation,
PhaseIdType currentPhase,
PhaseIdType[] defaultPhases)
Inspect an annotation to see if it specifies a view in which it should be. |
void |
observeInvokeApplication(PhaseEvent event)
Enforce any security annotations applicable to the InvokeApplication phase |
void |
observePreNavigateEvent(PreNavigateEvent event)
Monitor PreNavigationEvents, looking for a successful navigation from the Seam Security login button. |
void |
observeRenderResponse(PhaseEvent event)
Enforce any security annotations applicable to the RenderResponse phase |
void |
observeRestoreView(PhaseEvent event)
Enforce any security annotations applicable to the RestoreView phase |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecurityPhaseListener()
| Method Detail |
|---|
public void observeRenderResponse(@Observes
PhaseEvent event)
event -
public void observeInvokeApplication(@Observes
PhaseEvent event)
event -
public void observeRestoreView(@Observes
PhaseEvent event)
event -
public List<? extends Annotation> getRestrictionsForPhase(PhaseIdType currentPhase,
String viewId)
currentPhase - viewId -
public boolean isAnnotationApplicableToPhase(Annotation annotation,
PhaseIdType currentPhase,
PhaseIdType[] defaultPhases)
annotation - currentPhase - defaultPhases -
public PhaseIdType[] getDefaultPhases(String viewId)
viewId -
public Method getRestrictAtViewMethod(Annotation annotation)
annotation -
public PhaseIdType[] getRestrictedPhaseIds(Method restrictAtViewMethod,
Annotation annotation)
restrictAtViewMethod - annotation -
public void observePreNavigateEvent(@Observes
PreNavigateEvent event)
event -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||