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 2 Current »

When integrating towards to OIDC platform you will need to provide a redirect_uri where you will receive the Authorization Code/Token. This is done by specifying an endpoint in the backend of your web application. Using the JS Connector with its default redirect mode does not need any special considerations on the backend, but when using method inline or window, you can integrate further with the JS Connector. See the following sections for further information on Back-end implementation of the JS Connector:

Implementing redirect_uri when using method window or inline

Since the JS Connector can open an iframe or a window for you, the handling of the post-authentication step is also important. This section will explain how you can take advantage of cross-domain messaging (XDM) to send the received code / tokens from the active window or iframe to the parent page (your site).

The redirect_uri needs to handle the authorization response in order to receive authorization code and tokens on behalf of the user. This information is either delivered as part of the URL, or as a FORM POST depending on which response_mode is specified in the parameters.

Then, if you follow the callback page example for redirect_uri, you will see that special XDM calls are made to pass the information from the window/iframe to the listening JS Connector instance on the main site.

Finally this will cause the callback function passed in the doConnect method to be called with the data retrieved in the authentication response

Implementing redirect_uri when using code flow or hybrid flow

The implicit flow is special since it contains both the id_token and the access_token directly the requests to the redirect_uri, thus making back-end handling trivial. With the code flow and hybrid flow the back-end becomes slightly more complex since the Token endpoint must be called from the back-end to retrieve a complete set of tokens. It is beyond the scope of the JS Connector to describe how the response from the Token endpoint is further handled across the back-end and front-end of the merchant site.

Implementing redirect_uri when using Value Added Services

When using a Value Added Service, eg. TINFO Userinfo, with the JS Connector, the back-end implementation must also handle the request for such services based on an access_token that is delivered to the back-end along with the id_token, either directly in the request to the redirect_uri for implicit_mode or indirectly via an intermediate exchange with the Token Endpoint for code flow and hybrid flow. It is beyond the scope of the JS Connector to describe how the response from any Value Added Service is further handled across the back-end and front-end of the merchant site.

  • No labels