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.
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.
It is possible to automatically redirect to an external auth provider (as a means to set-up SSO) by using the autologin=<name-of-login-service> query parameter: https://integration.mediahaven.com/auth?client_id=882rgLgNTSqwBSnUUbC3qRiUfMGhorzZ&autologin=mediahaven Contact MediaHaven support if unsure on what value to use.
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 lang=<lang-code> query parameter: https://integration.mediahaven.com/auth?client_id=882rgLgNTSqwBSnUUbC3qRiUfMGhorzZ&lang=nl
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:
If you have multiple redirect_uri’s registered, you need to supply the correct one using the redirect_uri query parameter.
Redirect-URL are strictly matched. You can however add a state query parameter in your initial request to the auth portal, and it will be reflected when the user returns to your configured Redirect-URL
Swap Authorization code for an access token.
On your end, you would read the code query parameter from the URL and use it to obtain the access token.
The authorization_code can only be used once, and is only valid for a limited amount of time.
To obtain an actual access_token you would make a POST request to the following endpoint, and supply the code, client_id, client_secret and grant_type=authorization_code parameters
It's also possible a statuscode != 200 is returned. You must take appropriate action.
Resource Owner Password Credentials
The Resource Owner Password Credentials grant is used when the application exchanges the user’s username and password for an access token. This is something strongly advise not to use, but can be used.
To obtain an access_token you would make a POST request to the following endpoint, and supply the code, client_id, client_secret , username and password parameters.