-
Notifications
You must be signed in to change notification settings - Fork 4
Demo
THE DEMO SERVER IS NO LONGER AVAILABLE
A public instance of the LinkSmart Thing Directory is available at the following endpoint for testing purposes:
Service root endpoint:
https://demo.linksmart.eu/thing-directory
RESTful directory endpoint:
https://demo.linksmart.eu/thing-directory/td
Swagger UI (Generated from OpenAPI Specs) to try out various operations:
swagger-ui
For API documentation and other details, visit the wiki.
All endpoints are open to public as read-only.
Write access requires authentication using bearer tokens or as basic auth, which is only available to W3C Testing plugfest participants.
The token should be obtained from the designated OpenID Connect Provider.
There are few available OAuth 2.0 flows. Use the one which is most appropriate for your application.
Open the following URL in a web browser, login and get the code
:
<authorization-endpoint>?client_id=<client-id>&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=openid
Change the value of redirect_uri
to have an actual redirect instead of getting the code in body.
curl --location --request POST '<token-endpoint>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'client_id=<client-id>' \
--data-urlencode 'code=<code>>' \
--data-urlencode 'redirect_uri=urn:ietf:wg:oauth:2.0:oob'
curl --location --request POST '<token-endpoint>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_id=<client-id>' \
--data-urlencode 'username=<user>' \
--data-urlencode 'password=<pass>' \
--data-urlencode 'scope=openid'
curl --location --request POST '<token-endpoint>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<client-id>' \
--data-urlencode 'client_secret=<client-secret>'
In the Authorization header, with Bearer method:
Authorization: Bearer <token>
Pass the base64-encoded credentials as part of the requests in the Authorization header, with Basic method:
Authorization: Basic <base64(user:pass)>
The service uses OAuth 2.0 Resource Owner Password Credentials Grant to contact the Identity Provider and exchange credentials for id_token
and refresh_token
.