Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Tapestry-Security is just a thin layer on top of the <a href="http://incubator.apache.org/shiro/spring.html" rel="nofollow noreferrer">Apache Shiro</a> project. It only provides: </p> <ul> <li>a way to configure Shiro via your Tapestry application module</li> <li>a set of Tapestry filters to do the actual security checks for Tapestry pages and actions</li> <li><a href="http://tynamo.org/constant/tapestry-security/apidocs/org/tynamo/shiro/extension/authz/annotations/package-summary.html" rel="nofollow noreferrer">annotations</a> should you like to declare your security declaratively</li> <li><a href="http://tynamo.org/constant/tapestry-security/apidocs/org/tynamo/security/components/package-summary.html" rel="nofollow noreferrer">components</a> to support conditional rendering in your <code>.tml</code> files</li> </ul> <p>Underneath that layer, there is an ordinary instance of Shiro doing all the work, so you can access security (for example via the <a href="http://incubator.apache.org/shiro/static/current/apidocs/org/apache/shiro/SecurityUtils.html" rel="nofollow noreferrer">SecurityUtils</a> class) like you normally would if Tapestry wasn't involved at all.</p> <p><em>Edit based on comment:</em> So while you can use Shiro in any web application you use, Tapestry-Security is really just a wrapper for use with Tapestry. If you, however, have an app that includes Tapestry along with other servlets (such as a web service), you should be able to let Tapestry-Security do the initialization work.</p> <p><em>Concerning Tapestry filters:</em> I'm afraid this isn't documented very well. Tapestry filters work very much like Servlet Filters, but as Tapestry is <a href="http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/TapestryFilter.html" rel="nofollow noreferrer">implemented as a Servlet Filter itself</a>, it has its own filter chain. Filters for Tapestry implement the <a href="http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/services/RequestFilter.html" rel="nofollow noreferrer">RequestFilter</a> interface.</p> <pre><code>public class MyFilter implements RequestFilter { @Override public boolean service(final Request request, final Response response, final RequestHandler handler) throws IOException { ... //your code try { return handler.service(request, response); } finally { ... //your code } } } </code></pre> <p>You can add them to the filter chain by contributing them in your application module:</p> <pre><code>public void contributeRequestHandler( final OrderedConfiguration&lt;RequestFilter&gt; configurations) { configuration.add("MyFilter", new MyFilter()); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload