The purpose of this project is to create a fully functional interface for secure network application development.
A sample client is provided to test functionality.
Any GET request will return a printout of all usernames and display names. This will change.
- action
- see Actions
- username
- max size: 15 characters
- [password]
- only used for
CreateUserInsecure
- max size: 256 characters
- only used for
- [passwordHash]
- required for
CreateUserSecure
andLogin
- password should be pre-hashed with SHA-512
- required for
- [sessionID]
- required for all actions except
CreateUserInsecure
,CreateUserSecure
, andLogin
- required for all actions except
Login
- validates credentials and logs in user with new session ID
- POST form-data keys:
- action
- username
- passwordHash
- Non-Standard JSON Response
- sessionID
Logout
- logs out user by deleting current session ID
- POST form-data keys:
- action
- username
- sessionID
CreateUserSecure
- uses pre-hashed SHA-512 password to add new account to database
- POST form-data keys:
- action
- username
- passwordHash
CreateUserInsecure
- uses plain-text password to add new account to database
- POST form-data keys:
- action
- username
- password
Action
- test action to verify login validation works
- POST form-data keys:
- action
- username
- sessionID
DeleteAccount
- deletes account that's already been authenticated
- POST form-data keys
- action
- username
- sessionID
- on success:
- [message]
- on failure:
- [errorMessage]
- [messageID]
- required for
GetMessages
,MarkAsRead
, andDeleteMessage
- required for
- [recipients]
- required for
SendMessage
- JSON list of usernames
- required for
- [messageContent]
- required for
SendMessage
- max size: 500 characters
- required for
- [uploadedFiles]
- required for
SendMessage
- JSON list of file names
- should correlate with fileContent
- required for
- [fileContent]
- required for
SendMessage
- JSON dictionary of file names and base64-encoded file content
- required for
- [getOneMessage]
- required for
GetMessages
- "true"/"1" or "false"/"0"
- required for
- [getOnlyNewMessages]
- required for
GetMessages
- "true"/"1" or "false"/"0"
- required for
- [getFileContent]
- required for
GetMessages
- "true"/"1" or "false"/"0"
- fileContent will be null if false
- required for
- [messageRead]
- required for
MarkAsRead
- "true"/"1" or "false"/"0"
- required for
- [mailboxType]
- required for
DeleteMessage
- "Inbox" or "Sent"
- required for
Action
- test action to verify custom app loading works
- POST form-data keys:
- action
- username
- sessionID
SendMessage
- sends a message with zero to many file attachments to one or more recipients
- POST form-data keys:
- action
- username
- sessionID
- recipients
- messageContent
- uploadedFiles
- fileContent
- Non-Standard JSON Response
- messageID
GetMessages
- retrieves one message, all unread messages, or all messages with optional file attachment download
- POST form-data keys:
- action
- username
- sessionID
- getFileContent
- getOneMessage
- [messageID]
- include if getOneMessage is true
- [getOnlyNewMessages]
- include if getOneMessage if false
- Non-Standard JSON Response
- messages => JSON list of message dictionaries
- messageID
- fromUsername
- messageContent
- sentDateTime
- messageRead
- fileList => JSON list of file dictionaries
- fileID
- fileName
- fileContent
- base64-encoded file content
- messages => JSON list of message dictionaries
MarkAsRead
- marks a message as read or unread
- POST form-data keys:
- action
- username
- sessionID
- messageID
- messageRead
DeleteMessage
- deletes a message from specified mailbox
- POST form-data keys:
- action
- username
- sessionID
- messageID
- mailboxType