硬件开发工具链平台云服务-代码示例:代码示例

时间:2024-11-07 15:13:31

代码示例

@Controller
@RequestMapping("/api")
public class TestController {
    @GetMapping("/testApi")
    public String test(HttpServletRequest request) {
        String token = request.getHeader("Authorization");
        String issuer = verifyAndReturnIssuer(token);
        if (issuer.equals("user")) {
            return "success";
        }
        return "error";
    }
}
support.huaweicloud.com/devg-craftartsipdcenter/ipdcenter_08_0022.html