|
@@ -7,6 +7,7 @@ import java.util.Map;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
+import org.springframework.security.core.Authentication;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -94,4 +95,8 @@ public class IndexController extends BaseController {
|
|
return succeed(model);
|
|
return succeed(model);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @GetMapping(value = "/username")
|
|
|
|
+ public Object currentUserName(Authentication authentication) {
|
|
|
|
+ return succeed(authentication);
|
|
|
|
+ }
|
|
}
|
|
}
|