Class UserInfoController


  • @RestController
    @RequestMapping("/api/users")
    public class UserInfoController
    extends Object
    • Constructor Detail

      • UserInfoController

        public UserInfoController()
    • Method Detail

      • getUser

        @GetMapping("/current")
        public TokenUser getUser​(javax.servlet.http.HttpServletRequest request)
                          throws org.springframework.web.client.HttpClientErrorException
        Parameters:
        request - the http request
        Returns:
        current authenticated user
        Throws:
        org.springframework.web.client.HttpClientErrorException - exception when executing the request
      • getVisibleComponents

        @GetMapping("/components")
        public Collection<String> getVisibleComponents​(javax.servlet.http.HttpServletRequest request)
                                                throws org.springframework.web.client.HttpClientErrorException
        Parameters:
        request - the http request
        Returns:
        visible ui components according to user roles
        Throws:
        org.springframework.web.client.HttpClientErrorException - exception when executing the request
      • getRoles

        @GetMapping("/roles")
        public Collection<String> getRoles​(javax.servlet.http.HttpServletRequest request)
                                    throws org.springframework.web.client.HttpClientErrorException
        Parameters:
        request - the http request
        Returns:
        the intersection between user roles and app roles
        Throws:
        org.springframework.web.client.HttpClientErrorException - exception when executing the request