Revision History
Date | Version | Changes |
---|---|---|
2014-09-17 | 1.01 | Error in service URL in table corrected. |
2014-06-12 | 1.0 | Created |
All services requires the client to include a token, acquired from the login service, in the header of the request. The token will be valid for a limited period of time, but valid for all requests during that time interval.
Authentication process
To authenticate with resources exposed by the API, it is required to sign in with the login service.
The authentication process is done in two steps.
- Authenticate a user and acquire a token called Ticket Granting Ticket (TGT).
- Call resource in context with the TGT.
Service
URL | https://login.boknett.no/v1/tickets | ||
Method | POST | ||
Request parameters | username | Required | Username for whom to sign in as. |
password | Required | Password for whom to sign in as. | |
Response headers | Location | DEPRECATED | |
Boknett-TGT | TGT returned from login service | ||
Returns | 201 | Created | |
400 | Bad Request | ||
405 | Method Not Allowed |
Sample usage
curl -i -d "username=USERNAME&password=PASSWORD" https://login.boknett.no/v1/tickets HTTP/1.1 201 Created Date: Tue, 10 Jun 2014 16:23:42 GMT Server: Noelios-Restlet-Engine/1.1..1 Location: https://login.boknett.no/v1/tickets/TGT-152-leeshOABMDJE41s55z9WBLq7d7kk2ONUQozYHOF2FimxI5a9D9Z-login.boknett.no Accept-Ranges: bytes Boknett-TGT: TGT-152-leeshOABMDJE41s55z9WBLq7d7kk2ONUQozYHOF2FimxI5a9D9Z-login.boknett.no Content-Length: 0 Via: 1.1 login.boknett.no
Restrictions
Restriction | Current value |
---|---|
Maximum age of Authorization token (TGT) | 2 hours |