令牌端点可用于以编程方式请求令牌。它支持passwordauthorization_codeclient_credentialsrefresh_tokenurn:ietf:params:oauth:grant-type:device_code的类型。此外,可以扩展令牌端点以支持扩展授权类型。

注意

IdentityServer支持OpenID Connect和OAuth 2.0令牌请​​求参数的子集。有关完整列表,请参见此处

  • client_id

    客户标识符(必填)

  • client_secret

    客户端密钥可以在帖子正文中,也可以作为基本身份验证标头。可选的。

  • grant_type

    authorization_codeclient_credentialspasswordrefresh_tokenurn:ietf:params:oauth:grant-type:device_code或自定义

  • scope

    一个或多个注册范围。如果未指定,将发出所有明确允许范围的标记。

  • redirect_uri

    authorization_code授权类型所需

  • code

    授权代码(authorization_code授权类型需要)

  • code_verifier

    PKCE证明密钥

  • username

    资源所有者用户名(password授权类型所需)

  • password

    资源所有者密码(password授予类型所需)

  • acr_values

    允许传递password授权类型的其他身份验证相关信息- identityserver特殊情况下面的专有acr_values:

    • idp:name_of_idp 绕过login/home领域页面并将用户直接转发到选定的身份提供者(如果允许每个客户端配置)
    • tenant:name_of_tenant 可用于将租户名称传递给令牌端点
  • refresh_token

    刷新令牌(refresh_token授予类型所需)

  • device_code

    设备代码(urn:ietf:params:oauth:grant-type:device_code授权类型所需)

48.1 示例

POST /connect/token

    client_id=client1&
client_secret=secret&
grant_type=authorization_code&
code=hdh922&
redirect_uri=https://myapp.com/callback

(为了便于阅读,删除了表格编码并添加了换行符)

注意

您可以使用IdentityModel客户端库以编程方式从.NET代码访问令牌端点。有关更多信息,请查看IdentityModel文档

github地址

第49章 令牌端点(Token Endpoint) - Identity Server 4 中文文档(v1.0.0)的更多相关文章

  1. 第52章 撤销端点(Revocation Endpoint) - Identity Server 4 中文文档(v1.0.0)

    此端点允许撤消访问令牌(仅限引用令牌)和刷新令牌.它实现了令牌撤销规范(RFC 7009). token 要撤销的令牌(必填) token_type_hint access_token或refresh ...

  2. 第51章 内省端点(Introspection Endpoint) - Identity Server 4 中文文档(v1.0.0)

    内省端点是RFC 7662的实现. 它可用于验证引用令牌(如果消费者不支持适当的JWT或加密库,则可以使用JWT).内省端点需要身份验证 - 因为内省端点的客户端是API,您可以在其上配置秘密ApiR ...

  3. 第47章 授权端点(Authorize Endpoint) - Identity Server 4 中文文档(v1.0.0)

    授权端点可用于通过浏览器请求令牌或授权码.此过程通常涉及最终用户的身份验证和可选的同意. 注意 IdentityServer支持OpenID Connect和OAuth 2.0授权请求参数的子集.有关 ...

  4. 第48章 UserInfo端点(UserInfo Endpoint) - Identity Server 4 中文文档(v1.0.0)

    UserInfo端点可用于检索有关用户的身份信息(请参阅规范). 调用者需要发送代表用户的有效访问令牌.根据授予的范围,UserInfo端点将返回映射的声明(至少需要openid作用域). 示例 GE ...

  5. 第46章 发现端点(Discovery Endpoint) - Identity Server 4 中文文档(v1.0.0)

    发现端点可用于检索有关IdentityServer的元数据 - 它返回发布者名称,密钥材料,支持的范围等信息.有关详细信息,请参阅规范. 发现端点可通过/.well-known/openid-conf ...

  6. 第53章 结束会话端点(End Session Endpoint) - Identity Server 4 中文文档(v1.0.0)

    结束会话端点可用于触发单点注销(请参阅规范). 要使用结束会话端点,客户端应用程序会将用户的浏览器重定向到结束会话URL.用户在会话期间通过浏览器登录的所有应用程序都可以参与注销. 注意 终端会话端点 ...

  7. 第50章 设备授权端点(Device Authorization Endpoint) - Identity Server 4 中文文档(v1.0.0)

    设备授权端点可用于请求设备和用户代码.此端点用于启动设备流授权过程. 注意 终端会话端点的URL可通过发现端点获得. client_id 客户标识符(必填) client_secret 客户端密钥可以 ...

  8. 第5章 支持和咨询选项 - Identity Server 4 中文文档(v1.0.0)

    我们为IdentityServer提供了多种免费和商业支持和咨询选项. 5.1 免费支持 免费支持是基于社区的,并使用公共论坛 5.1.1 StackOverflow StackOverflow 社区 ...

  9. 第60章 设备流交互服务 - Identity Server 4 中文文档(v1.0.0)

    该IDeviceFlowInteractionService接口旨在提供用户界面用于在设备流授权期间与IdentityServer通信的服务.它可以从依赖注入系统获得,通常作为构造函数参数注入到Ide ...

随机推荐

  1. Keepalived+Nginx实现高可用Web负载均衡

    1.安装编译 Nginx 所需的依赖包# yum install gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zli ...

  2. .NET Core 微服务架构 Steeltoe 使用(基于 Spring Cloud)

    阅读目录: 1. Spring Cloud Eureka 注册服务及调用 2. Spring Cloud Hystrix 断路器 3. Spring Cloud Hystrix 指标监控 4. Spr ...

  3. php.ini中文翻译版--转载

    ;;;;;;;; ; 警告 ; ;;;;;;;;;;; ; 此配置文件是对于新安装的PHP的默认设置. ; 默认情况下,PHP使用此配置文件安装 ; 此配置针对开发目的,并且*不是*针对生产环境 ; ...

  4. emWin录音机,含uCOS-III和FreeRTOS两个版本

    第12期:录音机配套例子:V6-921_STemWin提高篇实验_录音机(uCOS-III)V6-922_STemWin提高篇实验_录音机(FreeRTOS) 例程下载地址: http://forum ...

  5. macOS 10.14虚拟机安装教程

    windows10下安装vmware14.0以及macOS 10.14图文详解 工具/原料   windows10 vmware 14.0 macOS 10.14懒人版 mac补丁unlocker工具 ...

  6. [Swift]LeetCode85. 最大矩形 | Maximal Rectangle

    Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and ...

  7. [Swift]LeetCode134. 加油站 | Gas Station

    There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...

  8. [Swift]LeetCode311. 稀疏矩阵相乘 $ Sparse Matrix Multiplication

    Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is ...

  9. [Swift]LeetCode599. 两个列表的最小索引总和 | Minimum Index Sum of Two Lists

    Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite ...

  10. [Swift]LeetCode682. 棒球比赛 | Baseball Game

    You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 ...