Google 云端硬盘让用户进行身份验证
GoogleDrive let user authenticate
我正在尝试将 GoogleDrive 实施到我的 .net 应用程序中
但在我使用的 http://www.daimto.com/google-drive-authentication-c/ 教程中,它说它只是将用户发送到 GoogleDrive 的登录页面,但问题是在哪里?我没有看到任何将用户发送到登录页面的代码。
所以我的问题是如何让用户在开始之前进行身份验证?
现在已经尝试了几天,但我不知道该怎么做。
希望有人能给我指出正确的方向。
您要找的是External Authentication Services with ASP.NET Web API。 MVC 支持许多外部提供程序,并且在 Visual Studio 和 MVC 项目中实现它们相当容易。
要从 ASP.NET 实现登录,请查看 OAuth 2.0 Web applications (ASP.NET MVC). You can also have a look at this MVC tutorial MVC 5 App with Facebook, Twitter, LinkedIn and Google OAuth2 Sign-on C# - 它包含您所要求的 - 重定向到 Google 登录页面。
Access-URL 嵌入到 Nuget-Package Google.Drive.API.v2/Auth/Client - 当您使用 assembly/the 类 url 是内部已知的:
可以在此处找到详尽的解释(以及 URL 使用纯 REST 访问服务时的解释)GDrive .NET Quickstart and here Using OAuth 2.0 for Server to Server Applications
我正在尝试将 GoogleDrive 实施到我的 .net 应用程序中 但在我使用的 http://www.daimto.com/google-drive-authentication-c/ 教程中,它说它只是将用户发送到 GoogleDrive 的登录页面,但问题是在哪里?我没有看到任何将用户发送到登录页面的代码。
所以我的问题是如何让用户在开始之前进行身份验证?
现在已经尝试了几天,但我不知道该怎么做。 希望有人能给我指出正确的方向。
您要找的是External Authentication Services with ASP.NET Web API。 MVC 支持许多外部提供程序,并且在 Visual Studio 和 MVC 项目中实现它们相当容易。
要从 ASP.NET 实现登录,请查看 OAuth 2.0 Web applications (ASP.NET MVC). You can also have a look at this MVC tutorial MVC 5 App with Facebook, Twitter, LinkedIn and Google OAuth2 Sign-on C# - 它包含您所要求的 - 重定向到 Google 登录页面。
Access-URL 嵌入到 Nuget-Package Google.Drive.API.v2/Auth/Client - 当您使用 assembly/the 类 url 是内部已知的:
可以在此处找到详尽的解释(以及 URL 使用纯 REST 访问服务时的解释)GDrive .NET Quickstart and here Using OAuth 2.0 for Server to Server Applications