Domea Services
Domea Services er et WebAPI der benytter en Token-Based Authentication arkitektur. Herunder kan du se hvordan du autheticater og får udstedt en token.
1. Authenticate
For at blive 'authenticated', skal der sendes en HTTP-Post til http://services.domea.dk/token med nedenstående HEADER og BODY
Request
Header
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Body
grant_type=password&username=[USERNAME]&password=[PASSWORD]
Response
{"access_token":[TOKEN],
"token_type":"bearer",
"expires_in":[TIMEUNITS]}
2. Request Service
For at requeste en services følgende data sendes med i http-headeren.
Header
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer [ACCESS_TOKEN]