mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
更换 HttpBasic 认证模块包名
This commit is contained in:
+3
-4
@@ -1,11 +1,10 @@
|
||||
package com.pj.cases.up;
|
||||
|
||||
import cn.dev33.satoken.httpauth.basic.SaHttpBasicUtil;
|
||||
import cn.dev33.satoken.util.SaResult;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.dev33.satoken.basic.SaBasicUtil;
|
||||
import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* Sa-Token Http Basic 认证
|
||||
*
|
||||
@@ -28,7 +27,7 @@ public class HttpBasicController {
|
||||
@RequestMapping("getInfo")
|
||||
public SaResult login() {
|
||||
// 1、Http Basic 认证校验,账号=sa,密码=123456
|
||||
SaBasicUtil.check("sa:123456");
|
||||
SaHttpBasicUtil.check("sa:123456");
|
||||
|
||||
// 2、返回数据
|
||||
String data = "这是通过 Http Basic 校验后才返回的数据";
|
||||
|
||||
Reference in New Issue
Block a user