-
Notifications
You must be signed in to change notification settings - Fork 1
Home
xtitter edited this page Apr 30, 2013
·
17 revisions
Welcome to the web wiki! install
authenication logic is in EduRideBase. It waits to authenticate with backend until eclipse needs to display the username. It will store a password token/hash and try to use that to authenticate -- timeout on the token is the responsibility of the server.
BASE is http://eduride.berkeley.edu/auth/
-
BASE/confirmAuthentication?PASSWORD_TOKEN
- PASSWORD-TOKEN is a sha2 hash
- return values *VALID:TRUE *VALID:FALSE
- Confirms that a user's stored password token is still valid.
- true means yes, the user can be considered authenticated.
- false means this token has expired, and they will have to use authenticate() again.
-
BASE/authenticate?u=USERNAME&p=PASSWORD_HASH&w=WORKSPACE_ID
- all inputs are strings. Note: PASSWORD_HASH is a straight SHA1 of the password, and is different than the PASSWORD_TOKEN
- return
- PASSWORD_TOKEN (a string) if successful: note, PASSWORD_TOKEN is a potentially short-lived hash, different every successful authentication
- emptiness if not successful
- attempt to authenticate user/pass
- workspaceID is a string, and it should be associated with the username. (This association may have already taken place earlier, of course).
-
BASE/closedSession?PASSWORD_TOKEN
- return is nothing
- This informs the server that the user has closed eclipse.
- This is so that the server can decide to expire the token at this point, if it wants; better to use this if possible than to expire tokens in the middle of an active session, how about.
- POST BASE/log?logs=LOGFILE
- LOGFILE is a JSON object with the following structure: {w:'WORKSPACE_GUID', logs: [ [verb1, object1, timestamp1], [verb2, object2, timestamp2], ...]}
- types
- WORKSPACE_GUID is string
- verbX, objectX are strings
- timestampX is an int
- Returns a JSON object indicating success or failure. Upon failure, the JSON object also includes an error message. (Ex: {'status':'success'}, {'status':'failure', 'message':'Bad HTTP request type: Use POST instead'})