|
@@ -0,0 +1,31 @@
|
|
|
+package com.qmth.demo.api.controller;
|
|
|
+
|
|
|
+import com.qmth.boot.api.annotation.Aac;
|
|
|
+import com.qmth.boot.api.annotation.BOOL;
|
|
|
+import com.qmth.boot.api.config.ApiConfig;
|
|
|
+import com.qmth.boot.api.constant.ApiConstant;
|
|
|
+import com.qmth.boot.core.security.config.SecurityConfig;
|
|
|
+import com.qmth.demo.api.auth.DemoSession;
|
|
|
+import org.springframework.web.bind.annotation.RequestAttribute;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/auth")
|
|
|
+@Aac(strict = BOOL.FALSE, auth = BOOL.TRUE)
|
|
|
+public class AuthController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ApiConfig apiConfig;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private SecurityConfig securityConfig;
|
|
|
+
|
|
|
+ @RequestMapping("/demo")
|
|
|
+ public Object security(@RequestAttribute DemoSession accessEntity) {
|
|
|
+ return accessEntity;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|