mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-21 19:17:25 +08:00
新增 Http Digest 认证模块简单实现
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.pj.test;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckHttpDigest;
|
||||
import cn.dev33.satoken.context.SaHolder;
|
||||
import cn.dev33.satoken.spring.SpringMVCUtil;
|
||||
import cn.dev33.satoken.stp.SaLoginConfig;
|
||||
@@ -52,4 +53,13 @@ public class TestController {
|
||||
return SaResult.ok();
|
||||
}
|
||||
|
||||
// 测试 Http Digest 认证 浏览器访问: http://localhost:8081/test/testDigest
|
||||
@SaCheckHttpDigest("sa:123456")
|
||||
@RequestMapping("testDigest")
|
||||
public SaResult testDigest() {
|
||||
// SaHttpDigestUtil.check("sa", "123456");
|
||||
// 返回
|
||||
return SaResult.data(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user