GrantValidationResult类模型补助确认为扩展授权和资源所有者密码授权的结果。

最常见的用法是使用身份验证(成功用例):

context.Result = new GrantValidationResult(
subject: "818727",
authenticationMethod: "custom",
claims: optionalClaims);

...或使用错误和描述(失败用例):

context.Result = new GrantValidationResult(
TokenRequestErrors.InvalidGrant,
"invalid custom credential");

在这两种情况下,您都可以传递将包含在令牌响应中的其他自定义值。

github地址

第57章 GrantValidationResult - Identity Server 4 中文文档(v1.0.0)的更多相关文章

  1. 第18章 启动 - Identity Server 4 中文文档(v1.0.0)

    IdentityServer是中间件和服务的组合.所有配置都在您的启动类中完成. 18.1 配置服务 您可以通过调用以下方法将IdentityServer服务添加到DI系统: public void ...

  2. 第66章 视频 - Identity Server 4 中文文档(v1.0.0)

    第66章 视频 66.1 2019 January [NDC] - 使用ASP.NET Core 2.2和3.0保护Web应用程序和API 1月[NDC] - 为基于OpenID Connect / ...

  3. 第41章 CORS - Identity Server 4 中文文档(v1.0.0)

    第41章 CORS IdentityServer中的许多端点将通过基于JavaScript的客户端的Ajax调用进行访问.鉴于IdentityServer最有可能托管在与这些客户端不同的源上,这意味着 ...

  4. 第21章 登录 - Identity Server 4 中文文档(v1.0.0)

    为了使IdentityServer能够代表用户发出令牌,该用户必须登录IdentityServer. 21.1 Cookie身份验证 使用由ASP.NET Core中的cookie身份验证处理程序管理 ...

  5. 第2章 术语 - Identity Server 4 中文文档(v1.0.0)

    规范.文档和对象模型等都使用特定的术语来表述. 2.1 IdentityServer IdentityServer是OpenID Connect提供程序 - 它实现OpenID Connect和OAu ...

  6. 第64章 学习 - Identity Server 4 中文文档(v1.0.0)

    以下是一些在线,远程和课堂培训选项,以了解有关ASP.NET Core Identity和IdentityServer4的更多信息. 64.1 现代应用程序的身份和访问控制(使用ASP.NET Cor ...

  7. 第56章 Client - Identity Server 4 中文文档(v1.0.0)

    该Client模型的OpenID Connect或OAuth 2.0 客户端-例如,本地应用,Web应用程序或基于JS的应用程序. 56.1 Basics Enabled 指定是否启用客户端.默认为t ...

  8. 第45章 工具 - Identity Server 4 中文文档(v1.0.0)

    该IdentityServerTools是为IdentityServer编写扩展代码时,你可能需要有效的内部工具的集合.要使用它,请将其注入代码,例如控制器: public MyController( ...

  9. 第32章 事件 - Identity Server 4 中文文档(v1.0.0)

    日志记录是更低级别的"printf"样式 - 事件代表有关IdentityServer中某些操作的更高级别信息.事件是结构化数据,包括事件ID,成功/失败信息,类别和详细信息.这使 ...

随机推荐

  1. Kafka监控工具kafka-monitor v0.1简要介绍

    Kafka Monitor为Kafka的可视化管理与监控工具,为Kafka的稳定运维提供高效.可靠.稳定的保障,这里主要简单介绍Kafka Monitor的相关功能与页面的介绍: Kafka Moni ...

  2. 【PHP版】火星坐标系 (GCJ-02) 与百度坐标系 (BD-09ll)转换算法

    首先感谢java版作者@宋宋宋伟,java版我是看http://blog.csdn.net/coolypf/article/details/8569813 然后根据java代码修改成了php代码. & ...

  3. 微信小程序中的AJAX——POST,GET区别

    注意:发送服务器时的DATA 最终发送给服务器的数据是 String 类型,如果传入的 data 不是 String 类型,会被转换成 String .转换规则如下: 对于 GET 方法的数据,会将数 ...

  4. For each...in / For...in / For...of 的解释与例子

    1.For each...in for each...in 语句在对象属性的所有值上迭代指定的变量.对于每个不同的属性,执行一个指定的语句. 语法: for each (variable in obj ...

  5. [复试机试]c++读取/写入文本文件

    读取文件 #include <iostream> #include <cstdio> #include <string> #include <cstdlib& ...

  6. CentOS 7 安装配置 OpenVPN 客户端

    安装 epel yum 源: $ rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm $ ...

  7. [Swift]LeetCode6. Z字形变换 | ZigZag Conversion

    The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like ...

  8. [Swift]LeetCode88. 合并两个有序数组 | Merge Sorted Array

    Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: T ...

  9. [SQL]LeetCode181. 超过经理收入的员工 | Employees Earning More Than Their Managers

    SQL架构 Create table If Not Exists Employee (Id ), Salary int, ManagerId int) Truncate table Employee ...

  10. [Swift]LeetCode233. 数字1的个数 | Number of Digit One

    Given an integer n, count the total number of digit 1 appearing in all non-negative integers less th ...