Application Module
¶
Introduction¶
The application component allows applications to register themselves, at which point they are issued an application token. The application token allows access to application-scoped resources.
Glossary¶
Application Token¶
Issued when a user registers an application. Requires verification of the application’s contact email address before the token is marked valid. Allows for accessing application-level resources. Required in order to request an auth token.
Validation Token¶
Used for email validation. Sent in a link to the specified email when an auth token is requested, or to the application contact email when an application token is requested.
Endpoints¶
-
POST
/app/register
¶ Allows a user to register a client application with the Olin API. This will grant them an application token which can later be used to either access client-specific resources or request an authorization token that will grant the application access to the API on a user’s behalf.
Users must agree to the Olin API Honor Code at https://github.com/DakotaNelson/olin-api/blob/master/HONOR-CODE.md
Parameters: - contact (str) – An email address to use as a designated contact for the application.
- name (str) – The name of the application.
- honorcode (bool) – A boolean value indicating whether or not the requester has read and agrees to the Olin API Honor Code.
- description (str) – A description of the application.
- homepage (str) – A URL pointing to the application’s website.
Status Codes: - 200 OK – Success
- 400 Bad Request – A JSON request parameter is missing or incorrect, or an app with the name and contact email already exist.
-
GET
/app/validate/
(token)¶ Given a validation token (what is sent in an email to the token requester’s email address), check that it is good, then mark the corresponding app as valid
Status Codes: - 200 OK – Success
- 400 Bad Request – The validation token provided is either invalid or expired.