2012-06-21 3 views
0

보안 모듈에서 파생 된 자체 보안 클래스를 작성했습니다.조치를 호출 할 수있는 경로가 없습니다. Security.authenticate가 발견되었습니다.

*  /authenticate   Security.authenticate 

내 템플릿은 다음과 같습니다 : 내 경로 테이블의 부분은 다음과 같습니다

<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> 

나는 다음과 같은 예외가 받고 있어요 : 조치를 호출 할 수

없음 경로를 Security.authenticate가 발견되었습니다.

/app/views/Security/index.html에서 (선 약 11)

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

답변

3

당신이 우리에게 authenticate(...)의 서명 좀 보여 주시겠습니까? Play에는 사용자가 가지고있는 경로에 따라 경로를 올바르게 작성하는 데 필요한 몇 가지 인수가 필요할 수 있습니다.

경로가 우선 지정되어 있는지 확인하십시오. 예 :

첫 번째 줄 앞에 두 번째 줄을 넣으면 경로가/authenticate 대신/security/authenticate에 매핑됩니다.