pbs-middleware-server/src/main/java/com/pbs/middleware/server/features/users/rest/UserController.java
/**
     * Returns currently logged in user based on {@link java.security.Principal}. This method is usually called from UI.
     *
     * @param principal principal is auto-injected by Spring Security
     * @return currently logged in user
     */
Returns currently logged in user based on  java.security.Principal. This method is usually called from UI.
@param principal principal is auto-injected by Spring Security
@return currently logged in user
Returns currently logged in user based on java . security . Principal . This method is usually called from UI . @param principal principal is auto - injected by Spring Security @return currently logged in user
@PreAuthorize(ALLOW_AUTHENTICATED)
    @GetMapping(ApiConfig.USERS_ME)
    public User me(Principal principal) {
        return mapper.mapToDto(service.getByUsername(principal.getName()));
    }
@ PreAuthorize ( ALLOW_AUTHENTICATED ) @ GetMapping ( ApiConfig . USERS_ME ) public User me ( Principal principal ) { return mapper . mapToDto ( service . getByUsername ( principal . getName ( ) ) ) ; }
Returns currently logged in user based on {@link java.security.Principal}.
Returns currently logged in user based on { @link java . security . Principal } .