Class RestAuthService
java.lang.Object
com.logicaldoc.webservice.AbstractService
com.logicaldoc.webservice.soap.endpoint.SoapAuthService
com.logicaldoc.webservice.rest.endpoint.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetSid()
Starts a new session.loginApiKey
(String apikey) Starts a new session.loginPostJSON
(WSCredentials cred) void
Closes a session.void
renew()
Renews the current sessionvoid
Renews a sessionMethods inherited from class com.logicaldoc.webservice.soap.endpoint.SoapAuthService
valid
Methods inherited from class com.logicaldoc.webservice.AbstractService
convertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
-
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 interfaceAuthService
- Specified by:
login
in interfaceAuthService
- Overrides:
login
in classSoapAuthService
- Parameters:
username
- The usernamepassword
- 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 interfaceAuthService
-
loginPostJSON
- Specified by:
loginPostJSON
in interfaceAuthService
-
loginApiKey
Description copied from interface:AuthService
Starts a new session.- Specified by:
loginApiKey
in interfaceAuthService
- Specified by:
loginApiKey
in interfaceAuthService
- Overrides:
loginApiKey
in classSoapAuthService
- Parameters:
apikey
- The API Key- Returns:
- The newly created session identifier(sid)
-
logout
Description copied from interface:AuthService
Closes a session.- Specified by:
logout
in interfaceAuthService
- Specified by:
logout
in interfaceAuthService
- Overrides:
logout
in classSoapAuthService
- Parameters:
sid
- identifier of the session or an API Key
-
getSid
- Specified by:
getSid
in interfaceAuthService
-
renew
Renews a session- Specified by:
renew
in interfaceAuthService
- Overrides:
renew
in classSoapAuthService
- Parameters:
sid
- identifier of the session
-
renew
@GET @Path("/renewcurrent") public void renew()Renews the current session
-