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 13 Next »

Revision History

 

DateVersionChanges
2014-09-171.01Error in service URL in table corrected and logout information added.
2014-06-121.0Created

 

All services requires the client to include a token, acquired from the authentication 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.

Login

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.

  1. Authenticate a user and acquire a token called Ticket Granting Ticket (TGT).
  2. Call resource in context with the TGT.

URLhttps://login.boknett.no/v1/tickets
MethodPOST
Request
parameters
usernameRequiredUsername for whom to sign in as.
passwordRequiredPassword for whom to sign in as.
Response
headers

Location

URL to logout service (Per 18.9.2014: This URL currently has a bug returning http instead of http, so it cannot be used directly. This will be fixed in next release)

Boknett-TGT

TGT returned from login service
Returns201Created
400Bad Request
405Method 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

Logout 

For security reasons it is recommended (although not required) to logout when finished using the TGT. This is not necessary for TGTs that are expired.

URLhttps://login.boknett.no/v1/tickets/{TGT}
MethodDELETE
Returns200OK
400Bad Request
405Method Not Allowed

Sample usage

curl  -X "DELETE" -i https://login.boknett.no/v1/tickets/TGT-152-leeshOABMDJE41s55z9WBLq7d7kk2ONUQozYHOF2FimxI5a9D9Z-login.boknett.no

HTTP/1.1 200 OK
Date: Tue, 10 Jun 2014 17:21:12 GMT
Server: Noelios-Restlet-Engine/1.1..1
Accept-Ranges: bytes
Content-Length: 0
Via: 1.1 login.boknett.no

Restrictions 

RestrictionCurrent value
Maximum age of Authorization token (TGT)2 hours

Test environment

https://login.boknett.webbe.no/

  • No labels