Class RestAuthService

All Implemented Interfaces:
AuthService, AuthService
Direct Known Subclasses:
RestAuthSwagger

@Path("/") @Consumes({"application/xml","application/json"}) @Produces("application/json") public class RestAuthService extends SoapAuthService implements AuthService
  • Constructor Details

    • RestAuthService

      public RestAuthService()
  • Method Details

    • login

      @GET @Path("/login") public String login(@QueryParam("u") String username, @QueryParam("pw") String password) throws AuthenticationException
      Description copied from interface: AuthService
      Starts a new session.
      Specified by:
      login in interface AuthService
      Specified by:
      login in interface AuthService
      Overrides:
      login in class SoapAuthService
      Parameters:
      username - The username
      password - The password
      Returns:
      The newly created session identifier(sid)
      Throws:
      AuthenticationException - the user was not authenticated
    • loginForm

      @POST @Path("/loginForm") @Consumes("application/x-www-form-urlencoded") public String loginForm(@FormParam("username") String username, @FormParam("password") String password)
      Specified by:
      loginForm in interface AuthService
    • loginPostJSON

      @POST @Path("/login") @Consumes("application/json") public String loginPostJSON(WSCredentials cred)
      Specified by:
      loginPostJSON in interface AuthService
    • logout

      @DELETE @Path("/logout") public void logout(@QueryParam("sid") String sid)
      Description copied from interface: AuthService
      Closes a session.
      Specified by:
      logout in interface AuthService
      Specified by:
      logout in interface AuthService
      Overrides:
      logout in class SoapAuthService
      Parameters:
      sid - The session identifier
    • getSid

      @GET @Path("/getSid") @Produces({"application/json","text/plain"}) public String getSid()
      Specified by:
      getSid in interface AuthService
    • renew

      @GET @Path("/renew") public void renew(@QueryParam("sid") String sid)
      Renews a session
      Specified by:
      renew in interface AuthService
      Overrides:
      renew in class SoapAuthService
      Parameters:
      sid - identifier of the session
    • renew

      @GET @Path("/renewcurrent") public void renew()
      Renews the current session