Class UserInfoController


  • @RestController
    @RequestMapping("/api/users")
    public class UserInfoController
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<java.lang.String> getRoles​(javax.servlet.http.HttpServletRequest request)  
      org.odpi.openmetadata.userinterface.uichassis.springboot.auth.TokenUser getUser​(javax.servlet.http.HttpServletRequest request)  
      java.util.Collection<java.lang.String> getVisibleComponents​(javax.servlet.http.HttpServletRequest request)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UserInfoController

        public UserInfoController()
    • Method Detail

      • getUser

        @GetMapping("/current")
        public org.odpi.openmetadata.userinterface.uichassis.springboot.auth.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 java.util.Collection<java.lang.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 java.util.Collection<java.lang.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