2-legged OAuth를 전제로 웹 서비스를 구축하고 있습니다.MVC3에서 HMAC 인증
각 인증 된 요청에는 포함 된 HMAC가 있습니다.
public ActionResult userInfoExample(string HMAC, string username)
{
MyMembership.checkHMAC(HMAC);
//get user
return View();
}
을하지만 HMAC는 모든 행동의 매개 변수에 포함 할 필요가 있기 때문에 즉, 상당히 불쾌한 :
나는이 다음과 같이 할 수 있습니다 알고있다. 그것의 약하게 입력하고 쓰레기.
[AuthorizeHMAC]
public ActionResult userInfoExample(string username)
{
//get user
return View();
}
I found this을, 그리고 내가 그럼 I found this, 사용자 정의 모달 바인더를 보라 언급을 읽은 후 나는 그 일을 할 수 있는지 확실하지 오전 :
나는 이런 식으로 뭔가를하고 싶었다.목표는 URL 매개 변수 즉, http : // www.website.com/foo/bar?username=xxx & hmac = xxxxxxxxx에 배치 된 HMAC를 사용하여 인증 (/ 승인)하는 것입니다.
누구든지 내가 읽을 수있는 참고 문헌이나 직접적인 해결책이 있는지 알고 싶습니다.
는 또한 API 보안의 내 기본적인 이해에 대한 비판에 오신 것을 환영하고, 또는 내가 일을하고 어떻게 내가 비슷한 할 http://mvcsecurity.codeplex.com/
에서
그 사이트는 오히려 혼란이다. 관련 코드의 스 니펫을 여기에 게시 할 수 있습니까? (또한 태블릿에있어 볼 필요가 없습니다.) – MrJD
출처 : http://mvcsecurity.codeplex.com/SourceControl/changeset/view/13151#149140 관련 섹션은 귀하의 시간에 대해 –
+1의 양식 값. 나는 그것이 오늘 작동하는지보기 위해 오늘 그것을 시험해 볼 것이다. – MrJD