Package org.apache.wicket.authorization
Class IAuthorizationStrategy.AllowAllAuthorizationStrategy
- java.lang.Object
-
- org.apache.wicket.authorization.IAuthorizationStrategy.AllowAllAuthorizationStrategy
-
- All Implemented Interfaces:
IAuthorizationStrategy
- Direct Known Subclasses:
AbstractPageAuthorizationStrategy,ActionAuthorizationStrategy
- Enclosing interface:
- IAuthorizationStrategy
public static class IAuthorizationStrategy.AllowAllAuthorizationStrategy extends java.lang.Object implements IAuthorizationStrategy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy
IAuthorizationStrategy.AllowAllAuthorizationStrategy
-
-
Field Summary
-
Fields inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy
ALLOW_ALL
-
-
Constructor Summary
Constructors Constructor Description AllowAllAuthorizationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisActionAuthorized(Component c, Action action)Gets whether the given action is permitted.<T extends IRequestableComponent>
booleanisInstantiationAuthorized(java.lang.Class<T> c)Checks whether an instance of the given component class may be created.booleanisResourceAuthorized(IResource resource, org.apache.wicket.request.mapper.parameter.PageParameters pageParameters)Checks whether a request with some parameters is allowed to a resource.
-
-
-
Method Detail
-
isInstantiationAuthorized
public <T extends IRequestableComponent> boolean isInstantiationAuthorized(java.lang.Class<T> c)
Description copied from interface:IAuthorizationStrategyChecks whether an instance of the given component class may be created. If this method returns false, theIUnauthorizedComponentInstantiationListenerthat is configured in thesecurity settingswill be called. The default implementation of that listener throws aUnauthorizedInstantiationException.If you wish to implement a strategy that authenticates users which cannot access a given Page (or other Component), you can simply throw a
RestartResponseAtInterceptPageExceptionin your implementation of this method.- Specified by:
isInstantiationAuthorizedin interfaceIAuthorizationStrategy- Parameters:
c- The component class to check- Returns:
- Whether the given component may be created
- See Also:
IAuthorizationStrategy.isInstantiationAuthorized(java.lang.Class)
-
isActionAuthorized
public boolean isActionAuthorized(Component c, Action action)
Description copied from interface:IAuthorizationStrategyGets whether the given action is permitted. If it is, this method should return true. If it isn't, this method should either return false or - in case of a serious breach - throw a security exception. Returning is generally preferable over throwing an exception as that doesn't break the normal flow.- Specified by:
isActionAuthorizedin interfaceIAuthorizationStrategy- Parameters:
c- The component to be acted uponaction- The action to authorize on the component- Returns:
- Whether the given action may be taken on the given component
- See Also:
IAuthorizationStrategy.isActionAuthorized(org.apache.wicket.Component, org.apache.wicket.authorization.Action)
-
isResourceAuthorized
public boolean isResourceAuthorized(IResource resource, org.apache.wicket.request.mapper.parameter.PageParameters pageParameters)
Description copied from interface:IAuthorizationStrategyChecks whether a request with some parameters is allowed to a resource.- Specified by:
isResourceAuthorizedin interfaceIAuthorizationStrategy- Parameters:
resource- The resource that should be processedpageParameters- The request parameters- Returns:
trueif the request to this resource is allowed.
-
-