URL | https://<baseurl>/oauth/authorize |
---|---|
Request |
|
Authentication | Basic |
Request parameters | See below |
Response elements | See below |
Example | See below |
Authorize is a standard endpoint that triggers authentication of an enduser via one of the IDP options, followed by authorization in terms of consent handling. Authorization information is then returned in the reponse to the requesting OIDC Client. The content of the authorization response is different for each of the supported protocol flows. The Authorize endpoint does in any case trigger a series of re-directs, eventually returning to the requesting OIDC Client at a redirect_uri
specified by the client. For security reasons only pre-registered redirect URIs are allowed.
Name | Support | Description |
---|---|---|
scope | List of scope values specifying what kind of resources (dataset) the OIDC Client requests access to. The value openid must always be included in the list. | |
response_type | Determines the protocol flow to be used, thus also governing the content and type of the response from the Authorize endpoint. The following combinations are supported:
| |
client_id | Unique ID (arbitrary string) configured at the OIDC Provider for the OIDC Client in question | |
redirect_uri | Redirect URI to which the Authorize response will be sent. This URI must exactly match one of the Redirect URI values for the OIDC Client pre-registered at the OpenID Provider | |
state | Currently not supported. Opaque value used to maintain state between the request and the callback. | |
response_mode | The response mode to be used for returning parameters from the Authorization Endpoint. The following values are supported:
Note: The .NET/C# example GitHub uses the OWIN framework. OWIN only accepts | |
nonce | String value used to associate a ODIC Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token | |
display | Not supported. The OIDC Provider from BankID does instead support GUI customization and JavaScript connectors to govern how IDP-dialogues are displayed. | |
prompt | Currently not supported. Specifies whether the Authorization Server prompts the enduser for re-authentication and consent. | |
max_age | Not supported. The OIDC Provider determines life-time values in the ID Token. | |
ui_locales | May be used to set a language preference for GUI handling. The default GUI experience supports nb (Norsk Bokmål) and en (English) | |
acr_values | Currently not supported. Requests use of any IDP at a given Level of Assurance (Authentication Context Class Reference) or above. A selector dialogue is shown to the enduser if more than one IDP option meet the required minimum level. Note that this parameter has no effect if the | |
login_hint | This parameter may be used to specify the use of any particularly named IDP (Authentication Method Reference) along with any pre-configuration for the designated IDP. Note that this parameter has no effect f the See further details on login_hint support for each of the supported IDPs. | |
id_token_hint | Currently not supported. An ID Token previously issued by the OIDC Provider used as a hint about the enduser's current or past authenticated session with the OIDC Client. Note that this parameter has precedence before both acr_values and login_hint . If the ID Token has expired, a new authentication is triggered for the IDP option that was used when the ID Token was issued. Otherwise the authentication is still granted valid and the OIDC Provider proceeds directly to the autorization stage via consent handling. |
Responses are different for each of the supported protocol flows as specified by the response_type
and response_mode
parameters in the Authorize request.
The standard response for this flow is to add relevant parameters as URL query-parameters to the redirect_uri,
unless a different response_mode
was specified. For this flow only code
is returned in the Authorize response. The Token endpoint must be called to retrive id_token
and access_token
.
The standard response for this flow is to add relevant parameters to the fragment component of the Redirection URI, unless a different response_mode was specified. For this flow both id_token
and access_token
is returned directly in the Authorize response.
The standard response for this flow is to add relevant parameters to the fragment component of the Redirection URI, unless a different response_mode was specified. For this flow code
and id_token
is returned in the Authorize response. The Token endpoint must be called to retrive access_token
.
Below is an example id_token as returned from the OIDC Provider in its BankID pilot configuration in pre-production:
{
"kid":"bankid-oauth",
"typ":"JWT",
"alg":"RS256"
}.{
"preferred_username":"Testesen, Test",
"name":"Testesen, Test",
"given_name":"Test",
"family_name":"Testesen",
"sub":"9578-6000-4-127698",
"iat":1485863742,
"iss":"https://preprod.bankidapis.no",
"auth_time":1485863742,
"exp":1485867342,
"birthdate":"1980-03-09",
"nonce":"63621460527719310(abriviated for display)c0NDk1NDIz",
"amr":["BankID"],
"azp":"DotNetClient",
"aud":"DotNetClient",
"c_hash":"SVJo7O-d4cY8N4VgiVwETQ"
}