docs(oauth2): 优化调整 oauth2 章节相关文档

This commit is contained in:
click33
2025-05-14 04:18:14 +08:00
parent 5b3a64b9fc
commit 3e13a39244
11 changed files with 109 additions and 81 deletions

View File

@@ -1,4 +1,4 @@
//package com.pj.oauth2.custom;
//package com.pj.oauth2.custom_grant_type;
//
//import cn.dev33.satoken.oauth2.exception.SaOAuth2Exception;
//import cn.dev33.satoken.oauth2.granttype.handler.PasswordGrantTypeHandler;

View File

@@ -1,4 +1,4 @@
//package com.pj.oauth2.custom;
//package com.pj.oauth2.custom_grant_type;
//
//import cn.dev33.satoken.SaManager;
//import cn.dev33.satoken.context.model.SaRequest;

View File

@@ -1,4 +1,4 @@
//package com.pj.oauth2.custom;
//package com.pj.oauth2.custom_grant_type;
//
//import cn.dev33.satoken.SaManager;
//import cn.dev33.satoken.util.SaFoxUtil;

View File

@@ -1,4 +1,4 @@
//package com.pj.oauth2.custom;
//package com.pj.oauth2.custom_scope;
//
//import cn.dev33.satoken.oauth2.data.model.oidc.IdTokenModel;
//import cn.dev33.satoken.oauth2.scope.handler.OidcScopeHandler;

View File

@@ -1,4 +1,4 @@
//package com.pj.oauth2.custom;
//package com.pj.oauth2.custom_scope;
//
//import cn.dev33.satoken.oauth2.data.model.AccessTokenModel;
//import cn.dev33.satoken.oauth2.data.model.ClientTokenModel;
@@ -9,17 +9,20 @@
//import java.util.Map;
//
///**
// * 自定义 userinfo scope 处理器
// * @author click33
// * @since 2024/8/20
// */
//@Component
//public class UserinfoScopeHandler implements SaOAuth2ScopeHandlerInterface {
//
// // 指示当前处理器所要处理的 scope
// @Override
// public String getHandlerScope() {
// return "userinfo";
// }
//
// // 当构建的 AccessToken 具有此权限时所需要执行的方法
// @Override
// public void workAccessToken(AccessTokenModel at) {
// System.out.println("--------- userinfo 权限,加工 AccessTokenModel --------- ");
@@ -34,8 +37,16 @@
// at.extraData.put("userinfo", map);
// }
//
// // 当构建的 ClientToken 具有此权限时所需要执行的方法
// @Override
// public void workClientToken(ClientTokenModel ct) {
// }
//
// // 当使用 RefreshToken 刷新 AccessToken 是否重新执行 workAccessToken 构建方法
// // 在一些实时性较高的数据中需要指定为 true
// @Override
// public boolean refreshAccessTokenIsWork() {
// return true;
// }
//
//}