#566 Update Google token endpoint.

This commit is contained in:
Chris R 2015-12-02 11:04:44 -08:00
parent 92c479869b
commit 3d8886a064
2 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Authentication.Google
public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/auth";
public static readonly string TokenEndpoint = "https://accounts.google.com/o/oauth2/token";
public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v3/token";
public static readonly string UserInformationEndpoint = "https://www.googleapis.com/plus/v1/people/me";
}

View File

@ -300,7 +300,7 @@ namespace Microsoft.AspNet.Authentication.Google
{
Sender = req =>
{
if (req.RequestUri.AbsoluteUri == "https://accounts.google.com/o/oauth2/token")
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
{
return ReturnJsonResponse(new
{
@ -332,7 +332,7 @@ namespace Microsoft.AspNet.Authentication.Google
});
}
return null;
throw new NotImplementedException(req.RequestUri.AbsoluteUri);
}
};
});
@ -489,7 +489,7 @@ namespace Microsoft.AspNet.Authentication.Google
{
Sender = req =>
{
if (req.RequestUri.AbsoluteUri == "https://accounts.google.com/o/oauth2/token")
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
{
return ReturnJsonResponse(new
{
@ -522,7 +522,7 @@ namespace Microsoft.AspNet.Authentication.Google
});
}
return null;
throw new NotImplementedException(req.RequestUri.AbsoluteUri);
}
};
options.Events = new OAuthEvents
@ -569,7 +569,7 @@ namespace Microsoft.AspNet.Authentication.Google
{
Sender = req =>
{
if (req.RequestUri.AbsoluteUri == "https://accounts.google.com/o/oauth2/token")
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
{
return ReturnJsonResponse(new
{
@ -602,7 +602,7 @@ namespace Microsoft.AspNet.Authentication.Google
});
}
return null;
throw new NotImplementedException(req.RequestUri.AbsoluteUri);
}
};
options.Events = new OAuthEvents
@ -659,7 +659,7 @@ namespace Microsoft.AspNet.Authentication.Google
{
Sender = req =>
{
if (req.RequestUri.AbsoluteUri == "https://accounts.google.com/o/oauth2/token")
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
{
return ReturnJsonResponse(new
{
@ -692,7 +692,7 @@ namespace Microsoft.AspNet.Authentication.Google
});
}
return null;
throw new NotImplementedException(req.RequestUri.AbsoluteUri);
}
};
});