Username and password authentication is designed for user interfaces.
For non-interactive, integration clients request a Persistent Access Token via the Online Photo Submission user interface. Then, Get/Refresh an Authentication Token (Session Token) using the persistent access token.
Login:
URI: https://api.onlinephotosubmission.com/api/login
HTTP Method: POST
Example HTTP Request Body
{ "username":"myUserName", "password":"myPassword" }
Example Response
200 OK { "username": "myUserName", "roles": [ "ROLE_CARDHOLDER", "ROLE_DIRECTOR", "ROLE_OFFICE" ], "access_token": "lotsOfRandomNumbersAndLetters" }
Logout:
URI: https://api.onlinephotosubmission.com/api/me/logout
HTTP Method: POST
Required Headers:
X-Auth-Token (see: Authentication)
Accept:
application/json
Content-Type:
application/json
Body:
{EMPTY}
Response:
204 NO CONTENT