Skip to content

Instantly share code, notes, and snippets.

@khamiltonuk
Created November 29, 2015 22:39
Show Gist options
  • Select an option

  • Save khamiltonuk/c7ed0ca70c2d73ca0bac to your computer and use it in GitHub Desktop.

Select an option

Save khamiltonuk/c7ed0ca70c2d73ca0bac to your computer and use it in GitHub Desktop.
Write annotation and a request interceptor
/**
* Annotation to mark a controller handler as requiring secure token checking
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface SecureToken {
String TOKEN_PARAMETER_NAME = "secureToken";
String value();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment