oak-general-business/lib/entities/OauthAuthorizationCodes.js

29 lines
896 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.entityDesc = void 0;
;
// PKCE 扩展 (RFC 7636)
// 1. 客户端生成 code_verifier (随机字符串)
// 2. 计算 code_challenge = BASE64URL(SHA256(code_verifier))
// 3. 授权请求携带 code_challenge
// 4. 存储到数据库
// 5. 令牌交换时验证 code_verifier
exports.entityDesc = {
locales: {
zh_CN: {
name: '授权码',
attr: {
code: '授权码',
application: 'Oauth应用',
user: '用户',
redirectUri: '重定向 URI',
scope: '权限范围',
codeChallenge: '代码挑战',
codeChallengeMethod: '代码挑战方法',
expiresAt: '过期时间',
usedAt: '使用时间',
},
},
},
};