Info |
---|
Login using OAuth2.0 is available since MediaHaven version 18.4. It is the preferred way of authenticating for new integrations. |
...
2. Obtaining a token
Client Credentials Grant a.k.a. interactive flow.
Info |
---|
If your app offers a UI, you are required to use this flow |
...
The user will be greeted by a MediaHaven login screen where he can login with one of the configured login options. Once logged in, the user will need to grant your app access to his account.
...
Info |
---|
In 18.4 only default MediaHaven credentials are supported. Starting from version 19.1, if SAML login is configured, it will also be available here. |
Tip |
---|
It is possible to automatically redirect to an external auth provider (as a means to set-up SSO) by using the |
Tip |
---|
By default the authorization portal will auto-sense the language used by the end-user. Supported languages are nl, fr and en. It is possible to override this auto-sensing by adding the |
If the user clicks the "Authorize" option he will be redirected back to your initially registered Redirect-URL, with the Authorization code as query parameter:
...
Below is an example of the request with cURL.
|
If all goes well, you'll receive a status 200 with the following JSON:
|
Warning |
---|
It's also possible a statuscode != 200 is returned. You must take appropriate action. |
...
Code Block |
---|
curl -X GET https://integration.mediahaven.com/mediahaven-rest-api/resourcesv2/mediarecords -H "Authorization: bearer WySMF6lvPBsuV4X2tImsXe14zjzb1GEC" |
...
If the response returns a 401 Unauthorized, that means that the refresh_token has expired or your App permissions have been revoked. You would then start the flow back from the beginning.
5. Supported combinations
Note |
---|
When logging in multiple times, it must always be done with the same method as the first time otherwise you will get unauthorized when on the next attempt with a different method. If you wish to switch to a different method the user must be deleted first in MediaHaven. |
Flow / Method | SAML | Active Directory | MediaHaven |
---|---|---|---|
| | | |
|