在.net core出来以后很多人使用identityServer做身份验证。

ids4和ids3的token验证组件都是基于微软的oauth2和bearer验证组件。园子里也很多教程,我们通过教程了解到is4有一个discovery endpoint。

顾名思义,Discovery定义了一个服务发现的规范,它定义了一个api( /.well-known/openid-configuration ),这个api返回一个json数据结构,其中包含了一些OIDC中提供的服务以及其支持情况的描述信息,这样可以使得oidc服务的RP可以不再硬编码OIDC服务接口信息。这个api返回的示例信息如下(这里面只是一部分)。

{
"issuer": "http://localhost:5000",发行网址,也就是说我们的权限验证站点。
"jwks_uri": "http://localhost:5000/.well-known/openid-configuration/jwks",这个接口获取的是公钥,用于验证jwt的数字签名部分(数字签名由sso维护的私钥生成)用的。   
"authorization_endpoint": "http://localhost:5000/connect/authorize",授权服务器的授权端点的URL。
"token_endpoint": "http://localhost:5000/connect/token",获取token的网址
"userinfo_endpoint": "http://localhost:5000/connect/userinfo",根据token获取用户信息
"end_session_endpoint": "http://localhost:5000/connect/endsession",登录注销。    "check_session_iframe": "http://localhost:5000/connect/checksession",客户端对check_session_iframe执行监视,可以获取用户的登出状态。    "revocation_endpoint": "http://localhost:5000/connect/revocation", 这个网址允许撤销访问令牌(仅access tokens 和reference tokens)。它实现了令牌撤销规范(RFC 7009)。    "introspection_endpoint": "http://localhost:5000/connect/introspect", introspection_endpoint是RFC 7662的实现。 它可以用于验证reference tokens(或如果消费者不支持适当的JWT或加密库,则JWTs)。    "frontchannel_logout_supported": true, 可选。基于前端的注销机制。   "frontchannel_logout_session_supported": true,可选。基于session的注销机制。
  "backchannel_logout_supported": true, 指示OP支持后端通道注销

  "backchannel_logout_session_supported": true, 可选的。指定RP是否需要在注销令牌中包含sid(session ID)声明,以在使用backchannel_logout_uri时用OP标识RP会话。如果省略,默认值为false。

  "scopes_supported": [ "api", "offline_access" ], 支持的范围

  "claims_supported": [], 支持的claims
  "grant_types_supported": [ "authorization_code", "client_credentials", "refresh_token", "implicit" ], 授权类型

  "response_types_supported": [ "code", "token", "id_token", "id_token token", "code id_token", "code token", "code id_token token" ], 
  支持的请求方式
  "response_modes_supported": [ "form_post", "query", "fragment" ],
  传值方式
  "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ],
  JSON数组,包含此令牌端点支持的客户端身份验证方法列表。
  "subject_types_supported": [ "public" ],
  JSON数组,包含此OP支持的主题标识符类型列表。 有效值是 pairwise 和 public.类型。 更多信息.
  "id_token_signing_alg_values_supported": [ "RS256" ],
  
  "code_challenge_methods_supported": [ "plain", "S256" ]
  JSON数组,包含此授权服务器支持的PKCE代码方法列表。
}

相关链接:
OpenID Connect & OAuth 2.0 APIOpenID Connect Back-Channel Logout 1.0 - draft 04

IdentityServer4 接口说明的更多相关文章

  1. Asp.NetCoreWebApi图片上传接口(二)集成IdentityServer4授权访问(附源码)

    写在前面 本文地址:http://www.cnblogs.com/yilezhu/p/9315644.html 作者:yilezhu 上一篇关于Asp.Net Core Web Api图片上传的文章使 ...

  2. IdentityServer4实现.Net Core API接口权限认证(快速入门)

    什么是IdentityServer4 官方解释:IdentityServer4是基于ASP.NET Core实现的认证和授权框架,是对OpenID Connect和OAuth 2.0协议的实现. 通俗 ...

  3. identityserver4源码解析_2_元数据接口

    目录 identityserver4源码解析_1_项目结构 identityserver4源码解析_2_元数据接口 identityserver4源码解析_3_认证接口 identityserver4 ...

  4. identityserver4源码解析_3_认证接口

    目录 identityserver4源码解析_1_项目结构 identityserver4源码解析_2_元数据接口 identityserver4源码解析_3_认证接口 identityserver4 ...

  5. IdentityServer4源码解析_4_令牌发放接口

    目录 identityserver4源码解析_1_项目结构 identityserver4源码解析_2_元数据接口 identityserver4源码解析_3_认证接口 identityserver4 ...

  6. IdentityServer4源码解析_5_查询用户信息接口

    协议简析 UserInfo接口是OAuth2.0中规定的需要认证访问的接口,可以返回认证用户的声明信息.请求UserInfo接口需要使用通行令牌.响应报文通常是json数据格式,包含了一组claim键 ...

  7. HttpClient调用IdentityServer4获取Token并调用接口

    using System; using System.Net.Http; using IdentityModel.Client; namespace ClientCredential { class ...

  8. ASP.NET Core的身份认证框架IdentityServer4(8)- 使用密码认证方式控制API访问

    前言 本文及IdentityServer这个系列使用的都是基于.net core 2.0的.上一篇博文在API项目中我使用了icrosoft.AspNetCore.Authentication.Jwt ...

  9. IdentityServer4实现Token认证登录以及权限控制

    相关知识点 不再对IdentityServer4做相关介绍,博客园上已经有人出了相关的系列文章,不了解的可以看一下: 蟋蟀大神的:小菜学习编程-IdentityServer4 晓晨Master:Ide ...

随机推荐

  1. 【亲测可用,亦可配置同一平台的不同账号,例如阿里云的两个不同账号】Windows下Git多账号配置,同一电脑多个ssh-key的管理

    Windows下Git多账号配置,同一电脑多个ssh-key的管理   这一篇文章是对上一篇文章<Git-TortoiseGit完整配置流程>的拓展,所以需要对上一篇文章有所了解,当然直接 ...

  2. 机器学习笔记——t分布知识点总结

    (原创文章,转载请注明地址:http://www.cnblogs.com/wangkundentisy/p/6539058.html ) 1.t分布式统计分布的一种,同卡方分布(χ2分布).F分布并称 ...

  3. STL基础--算法(已排序数据的算法,数值算法)

    已排序数据的算法 Binary search, merge, set operations 每个已排序数据算法都有一个同名的更一般的形式 vector vec = {8,9,9,9,45,87,90} ...

  4. SVM的sklearn实现

    转载:豆-Metcalf 1)SVM-LinearSVC.ipynb-线性分类SVM,iris数据集分类,正确率100% """ 功能:实现线性分类支持向量机 说明:可以 ...

  5. Ubuntu 14.10 下连接SuperVessel Cloud

    第一次创建实例后,系统会分配一个VPN用户,用于连接到系统. 官方帮助文档给出了使用方法 Linux VPN 客户端的配置方法 . 安装 VPNC: $ apt-get install vpnc $ ...

  6. bzoj4933: 妙

    Description Mr.董已经成长为一个地区的领袖,真是妙啊.董所在的地区由n个小区域构成,这些小区域构成了一棵树,每个小 区域都有一个重要程度,一个连通块的重要程度为其包含的小区域重要程度之和 ...

  7. xp sql2000 安装SP4失败解决方案

    环境:xp sp3 SQL: sql2000sql2000 SP4下载链接: http://www.microsoft.com/downloads/details.aspx?familyid=8E2D ...

  8. 安卓模拟器错误 PANIC: Could not open

    最近在配置Android环境的时候着实让我迷惘了许久,最主要的一个问题就是在创建AVD的时候,出现如下问题: PANIC: Could not open ***

  9. P1616疯狂的采药

    传送 它不是可爱的01背包了!!!这个题中一种药可以采无限次!!! 它进化成了完全背包.完全背包中的内循环从m到v[i]改成了从v[i]到m 既然如此,代码如下: #include<iostre ...

  10. P1601高精度加法

    传送门 虽然本题一本通上有,但是一本通不是万能的,这道题就漏掉了进位(所以这告诉我们加法进位很重要) 直接上修改后的题解 #include<iostream> #include<cs ...