Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get logged-in user in Spring Security

Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
// Get user name
authentication.getName()
Code language: JavaScript (javascript)
Source by bhutanio.com #
 
PREVIOUS NEXT
Tagged: #user #Spring #Security
ADD COMMENT
Topic
Name
7+5 =