Open GoogleCodeExporter opened 9 years ago
Hi,
Thanks for your great inputs. We'll explore more on this and try to incorporate
it as per your suggestions.
thanks
Deepak
Original comment by daggar...@brickred.com
on 23 Nov 2011 at 8:30
I did something like this in OAuth2_0server class. I think the state parameter
is Facebook specific, not sure.
DirectUserToServiceProvider(){
string CodeState = Guid.NewGuid().ToString();
SessionManager.userSession.CodeState = CodeState;
oauthParams.Add("state", CodeState);
}
HandleAuthorizationCode(QueryParameters responseCollection)
{
if (responseCollection.HasName("state"))
{
var state = responseCollection["state"];
var isValid = SessionManager.userSession.CodeState == state;
if(!isValid)
{
throw new OAuthException(ErrorMessages.CodeAuthorizationValidationFailed(provider.ProviderType, responseCollection));
}
}
}
Original comment by kun...@gmail.com
on 30 Nov 2011 at 9:10
Original comment by l...@brickred.com
on 5 Jun 2012 at 11:00
Original comment by deepak.a...@3pillarglobal.com
on 25 Feb 2014 at 9:36
Original issue reported on code.google.com by
kun...@gmail.com
on 22 Nov 2011 at 10:21