Class UserAuthenticationResource


  • @Path("/auth/user")
    public class UserAuthenticationResource
    extends java.lang.Object
    Jax-Rs resource allowing users to authenticate with username and password

    Author:
    Daniel Meyer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static WebappLogger LOGGER  
      static java.lang.String PATH  
      protected javax.servlet.http.HttpServletRequest request  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response doLogin​(java.lang.String engineName, java.lang.String appName, java.lang.String username, java.lang.String password)  
      javax.ws.rs.core.Response doLogout​(java.lang.String engineName)  
      protected javax.ws.rs.core.Response forbidden()  
      javax.ws.rs.core.Response getAuthenticatedUser​(java.lang.String engineName)  
      protected java.util.List<java.lang.String> getGroupsOfUser​(ProcessEngine engine, java.lang.String userId)  
      protected java.util.List<java.lang.String> getTenantsOfUser​(ProcessEngine engine, java.lang.String userId)  
      protected javax.ws.rs.core.Response notFound()  
      protected javax.ws.rs.core.Response unauthorized()  
      • Methods inherited from class java.lang.Object

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

      • request

        @Context
        protected javax.servlet.http.HttpServletRequest request
    • Constructor Detail

      • UserAuthenticationResource

        public UserAuthenticationResource()
    • Method Detail

      • getAuthenticatedUser

        @GET
        @Path("/{processEngineName}")
        public javax.ws.rs.core.Response getAuthenticatedUser​(@PathParam("processEngineName")
                                                              java.lang.String engineName)
      • doLogin

        @POST
        @Path("/{processEngineName}/login/{appName}")
        public javax.ws.rs.core.Response doLogin​(@PathParam("processEngineName")
                                                 java.lang.String engineName,
                                                 @PathParam("appName")
                                                 java.lang.String appName,
                                                 @FormParam("username")
                                                 java.lang.String username,
                                                 @FormParam("password")
                                                 java.lang.String password)
      • getGroupsOfUser

        protected java.util.List<java.lang.String> getGroupsOfUser​(ProcessEngine engine,
                                                                   java.lang.String userId)
      • getTenantsOfUser

        protected java.util.List<java.lang.String> getTenantsOfUser​(ProcessEngine engine,
                                                                    java.lang.String userId)
      • doLogout

        @POST
        @Path("/{processEngineName}/logout")
        public javax.ws.rs.core.Response doLogout​(@PathParam("processEngineName")
                                                  java.lang.String engineName)
      • unauthorized

        protected javax.ws.rs.core.Response unauthorized()
      • forbidden

        protected javax.ws.rs.core.Response forbidden()
      • notFound

        protected javax.ws.rs.core.Response notFound()