0
votes

I've written an own security class, derived from the security module. part of my routes-table looks like this:

*       /authenticate           Security.authenticate

and my template looks like this:

<form action="@{Security.authenticate()}" method="POST">
<label for="user">E-Mail:</label>
<input type="text" name="email" id="email" />
   <label>password:</label>    <input type="password" name="password" size="19"/>
   <input type="submit" value="Signin" />
</form>

I'm getting the following exception:

No route able to invoke action Security.authenticate was found.

In /app/views/Security/index.html (around line 11)

<form action="@{Security.authenticate()}" method="POST">
1

1 Answers

3
votes

Could you show us the signature of authenticate(...) please ? Play might need some arguments to build the route properly, depending of what you have there.

Make sure your route is specified before an overriding one. For example :

*     /authenticate                            Security.authenticate
*     /{controller}/{action}                   {controller}.{action}

Putting the second line before the first one, results in your route being mapped to /security/authenticate instead of /authenticate.