authentication - Play framework: How to require login for some actions, but not all -


adding @with(secure.class) controller blocks unauthenticated access. there way enabled actions, or except actions after it's enabled on controller?

you can't secure module. niels said secure module more example solution. can build own security system @before annotation. here example:

public class admin extends controller {  @before(unless={"login", "authenticate", "logout", "othermethod"}) void checkaccess() {     // check cookie }  public void login() {     render(); }  public void authenticate(string email, string password) {     // check params , set value in cookie }  public void logout() {     // delete cookie } 

i recommend read source code of secure module.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -