OpenID Connect is a simple standardized identity (authentication) layer on top of OAuth 2.0.
Discovery and configuration
All you need to know in order to configure your OpenID Connect client to the Dataporten platform, is available through the discovery endpoint:
In order to access the Dataporten APIs, you would first need to register your application, and obtain the OAuth credentials for your application.
You may register your application using the Dataporten Dashboard.
When registering a client, you need to know the OpenID Connect redirect URI endpoint of your application.
In order to use OpenID Connect you need to have the
openid scope. This can be selected in the Dataporten dashboard.
OpenID Connect also defines a few other standard scopes. Of these the
Dataporten will enable OpenID Connect functionality on the same authorization endpoint as the one used with basic OAuth. At the moment the client is requesting a token with the scope
- Authorization Code flow
- Implicit grant flow
- IDtoken signed with PKI (RS256)
Dynamic registration is not supported.
Login hints - bypassing the login discovery page
The default behaviour when a client sends the end user to Dataporten for authentication is that the user first meets eigther the account chooser or the ID-provider discovery page.
Sometimes the client may want to let the user bypass the discovery page / accountchooser and to a specific ID provider. This is possible by using the OpenID login_hint parameter to the authorization endpoint.
The following prerequisites needs ot be met to use this functionality:
- The client owner needs to configure the client to not require user interaction. This can be done using Dataporten Developer Dashboard. Uncheck the checkbox «Require user interaction».
- Consider the security implications of allowing Single Sign-on to automatically login users to your site without user interaction.
- Make sure that the openid scope is enabled for the client. If not, the request is interpreted as a plain Oauth request, and then the login hint functionality is not supported
The login_hint parameter is sent as part of the authentication request to Dataporten as a query string parameter. The parameter may have one of these values:
Automatically send user to Feide login page with no specific organization preselected. Feide will remember if the user has selected an organization previously.
Automatically send user to Feide login page with the specific organization UNINETT. UNINETT will then be preselected in the Feide login page.
Automatically send user to Feide login page with the specific organization UNINETT. UNINETT will then be preselected in the Feide login page. Also specify which user we exepect to login. If user tries to login with another account the user will get an warning that the user was not expected, but the userID is not enforced beyound that.
Automatically send user to ID-porten
JWT Signing key
The signing key may be obtained here:
The ID token is a signed information object representing the authenticated identity of the user. As part of the OpenID Connect standard the ID token is encoded as a JWT, and signed using the JWS standard.
ID Token example
ID Token JWT decoded
The userinfo endpoint is:
Example of a userinfo response:
The set of information that will be available on the userinfo depends on which scopes the client has authorized and requested in the authorization request.
Even though OpenID Connect is a relatively new technology, there already exist libraries in most programming languages.
We are interested in feedback on your experience with various client libraries, on how well they work with Dataporten.