【文件属性】:
文件名称:oidc-demo:Authing OIDC 后端处理方式,基本示例
文件大小:13KB
文件格式:ZIP
更新时间:2021-05-08 05:04:45
JavaScript
oidc-demo
Authing OIDC RP 端处理方式,基本示例。
帮助不熟悉 OIDC 流程处理方式的开发者熟悉 OIDC 的处理过程。示例中包括 code 换 token,token 换用户信息,受保护资源受访问时判断用户是否有权限,有权限时返回资源,无权限时重定向到 Authing OIDC 登录授权页面。
参考文档
若以上文档无法访问,请将域名改为 learn.authing.cn。
如何运行
克隆该项目:
git clone https://github.com/Authing/oidc-demo/
然后运行:
$ yarn
$ node index.js
Demo 及原理讲解
基础配置
const port = 8888;
const oidcAppId = 'OIDC 应用 AppId';
const oidcAppSecret = 'OIDC 应用 AppSecre
【文件预览】:
oidc-demo-master
----yarn.lock(19KB)
----README.md(4KB)
----.gitignore(1KB)
----index.js(3KB)
----package.json(356B)