mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-12-17 09:35:37 +08:00
update sa-token-doc/doc/up/basic-auth.md.
This commit is contained in:
@@ -14,7 +14,11 @@ Http Basic 是 http 协议中最基础的认证方式,其有两个特点:
|
||||
``` java
|
||||
@RequestMapping("test3")
|
||||
public SaResult test3() {
|
||||
SaBasicUtil.check("sa:123456");
|
||||
try {
|
||||
SaBasicUtil.check("sa:123456");
|
||||
} catch(NotBasicAuthException e) {
|
||||
System.out.println("校验失败处理");
|
||||
}
|
||||
return SaResult.ok();
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user