porscheinformatik / tapestry-csrf-protection

Tapestry CSRF Protection
Apache License 2.0
10 stars 9 forks source link

Tapestry CSRF Protection

Maven Central

Cross-Site-Request-Forgery (CSRF) protection for Apache Tapestry 5.

This project is based on the GSoC 2011 project hosted on Google Code: https://code.google.com/p/gsoc2011-csrf-protection/

License

This software is licensed under the Apache Software License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0.txt

Changes

Features

Usage

Just add this module as a Maven (or Gradle or Ivy) dependency:

<dependency>
    <groupId>at.porscheinformatik.tapestry</groupId>
    <artifactId>tapestry-csrf-protection</artifactId>
    <version>${tapstry-csrf.version}</version>
</dependency>

If you have pages that should not be checked for CSRF token, then add the annotation @NotCsrfProtected.

@NotCsrfProtected
public class MyInsecurePage
{
    @Component
    private EventLink save;

    @OnEvent("save")
    void save()
    {
        // this event handler is not protected
    }
}