Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

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/person/me/logout

HTTP Method: POST

Required Headers: 

  • X-Auth-Token (see: Authentication)

  • Accept: application/json

  • Content-Type: application/json

Body (optional):

{
    "authenticationToken": "[authentication token value]"
}
  • If specified, only this authentication token is deleted. Other sessions belonging to this user which use other tokens will remain active.

  • If not specified (or if the specified value doesn’t match an existing token), ALL authentication tokens will be deleted, immediately ending ALL sessions for this user.

Response:

204 NO CONTENT

  • No labels