- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class LoginServlet
extends BaseServlet
The login servlet is used to issue RaptureContexts and to validate
RaptureContexts.
The request is always posted, and contains the following fields:
1. METHOD - "RequestContext", "Login", "ValidateContext" 2. CONTENT - the
content of the request
We then call the appropriate method (doRequestContext(params) ) and the
response is passed back to the caller as a JSON string, which either contains
an exception or a valid response.
Login is a two-phase process. First a caller requests a context - this is a
random uuid, but we store that as data, but blank apart from the username the
context is for. A set of salt is also computed.
Then the caller performs a login by sending a hash(hash(password), salt)
where password is the password for that user.
The server can also compute hash(hash(password), salt) as it has
hash(password) and salt. If the strings are equal the user is logged in and
the context id is associated with that user for a certain amount of time.
- See Also:
- Serialized Form