CallbackPath实现 [英] CallbackPath implementation

查看:119
本文介绍了CallbackPath实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用各种示例来编写自己的示例,但是我不完全了解正在发生的事情.也许有人可以提供一些见识.

I'm trying to use the various examples as a means to write my own, but I don't fully understand what is happening. Maybe someone can offer some insight.

我认为我需要实现一些URL,以侦听来自第三方身份验证请求的回调,但是例如,当我查看github实现时,我会看到

I thought I needed to implement some URL that is listening for a callback from the 3rd party auth request, but when I look at the github implementation, for example, I see

public const string CallbackPath = "/signin-github";

我看不到有什么在听.

推荐答案

回调端点由OAuth2通用处理程序管理:

The callback endpoint is managed by the OAuth2 generic handler:

  • https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNetCore.Authentication/RemoteAuthenticationHandler.cs#L40-L55
  • https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNetCore.Authentication.OAuth/OAuthHandler.cs#L45

您不需要(也不应该)创建自己的路线.

You don't need to (and shouldn't) create your own route.

这篇关于CallbackPath实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆