TOC 
DraftN. Sakimura
 NRI
 J. Bradley
 Independent
 B. de Medeiros
 Google
 M. Jones
 Microsoft
 E. Jay
 Illumila
 April 10, 2012


OpenID Connect Standard 1.0 - draft 09

Abstract

OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It allows Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the End-User in an interoperable and RESTful manner.

OpenID Connect Standard 1.0 is an HTTP protocol binding for OpenID Connect Messages 1.0 request and response messages.



Table of Contents

1.  Introduction
    1.1.  Requirements Notation and Conventions
    1.2.  Terminology
2.  Authorization Endpoint
    2.1.  OpenID Connect Scopes
    2.2.  Protocol Flows
        2.2.1.  How to Get an Authorization Code, Access Token, and ID Token
        2.2.2.  Authorization Code Flow
        2.2.3.  Implicit Flow
    2.3.  Authorization Request
        2.3.1.  Client Prepares an Authorization Request
            2.3.1.1.  Simple Request Method
            2.3.1.2.  Request Parameter Method
            2.3.1.3.  Request File Method
        2.3.2.  Authorization Server Validates Request Object
        2.3.3.  Authorization Server Authenticates the End-User
        2.3.4.  Authorization Server Obtains the End-User Consent/Authorization
        2.3.5.  Authorization Server Sends the End-User Back to the Client
            2.3.5.1.  End-User Grants Authorization
            2.3.5.2.  End-User Denies Authorization or Invalid Request
3.  Token Endpoint
    3.1.  Requesting an Access Token
        3.1.1.  Access Token Request
        3.1.2.  Access Token Response
        3.1.3.  Access Token Error Response
    3.2.  Refreshing an Access Token
        3.2.1.  Refresh Token Response
        3.2.2.  Refresh Token Error Response
4.  Check ID Endpoint
    4.1.  Check ID Request
    4.2.  Check ID Response
        4.2.1.  Check ID Response Verification
    4.3.  Check ID Error Response
5.  UserInfo Endpoint
    5.1.  UserInfo Request
    5.2.  UserInfo Response
    5.3.  UserInfo Error Response
6.  Discovery and Registration
7.  Serializations
    7.1.  Query String Serialization
    7.2.  Form Serialization
8.  Security Considerations
    8.1.  Implicit Grant Flow Threats
9.  Privacy Considerations
10.  IANA Considerations
    10.1.  OAuth Parameters Registry
        10.1.1.  Authorization Request Parameter (display)
        10.1.2.  Authorization Request Parameter (prompt)
        10.1.3.  Authorization Request Parameter (nonce)
        10.1.4.  Authorization Request Parameter (request)
        10.1.5.  Authorization Request Parameter (request_uri)
        10.1.6.  ID Token Response Parameters
    10.2.  OAuth Extensions Error Registry
        10.2.1.  Authorization Endpoint Error (invalid_redirect_uri)
        10.2.2.  Authorization Endpoint Error (interaction_required)
        10.2.3.  Authorization Endpoint Error (login_required)
        10.2.4.  Authorization Endpoint Error (session_selection_required)
        10.2.5.  Authorization Endpoint Error (consent_required)
        10.2.6.  Authorization Endpoint Error (invalid_request_uri)
        10.2.7.  Authorization Endpoint Error (invalid_openid_request_object)
        10.2.8.  UserInfo Endpoint Error (invalid_schema)
11.  References
    11.1.  Normative References
    11.2.  Informative References
Appendix A.  Footnotes
    A.1.  Example JWT Values
Appendix B.  Acknowledgements
Appendix C.  Notices
Appendix D.  Document History
§  Authors' Addresses




 TOC 

1.  Introduction

This specification describes the binding of the HTTP protocol with the endpoints described in OpenID Connect Messages (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].



 TOC 

1.1.  Requirements Notation and Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] (Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.) .

Throughout this document, values are quoted to indicate that they are to be taken literally. When using these values in protocol messages, the quotes MUST NOT be used as part of the value.



 TOC 

1.2.  Terminology

This specification uses the terms "Access Token", "Refresh Token", "Authorization Code", "Authorization Grant", "Authorization Server", "Authorization Endpoint", "Client", "Client Identifier", "Client Secret", "Protected Resource", "Resource Owner", "Resource Server", and "Token Endpoint" defined by OAuth 2.0 (Hammer, E., Ed., Recordon, D., and D. Hardt, “OAuth 2.0 Authorization Protocol,” March 2012.) [OAuth2.0], and the terms defined by OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages]. This specification also defines the following terms:

Request File
A document whose contents is a JWT representing a set of Authorization Request parameters.
Request File URI
A URL that references a Request File. The Request File contents MUST be retrievable by the Authorization Server.


 TOC 

2.  Authorization Endpoint

The Authorization Endpoint performs authentication services for the End-User and requests authorization from the End-User to release information to OpenID Connect Relying Party Clients. When an End-User accesses a Relying Party Client application that requires the End-User's identifier and other information, it sends the End-User to the Authorization Server's Authorization Endpoint for authentication and authorization. The Authorization Server then issues an ID Token that asserts the End-User's identifier and an Access Token that allows the Client to access the End-User's information at Protected Resource endpoints. Protected Resource endpoints MAY perform different actions or return different information based on the scopes associated with the presented Access Token. Clients MUST specify how the Access Token and ID Token are to be returned using the response_type parameter in the Authorization Request.



 TOC 

2.1.  OpenID Connect Scopes

Clients MUST specify the desired scopes in an Authorization Request to obtain an Access Token with the proper permissions. The scope names used by OpenID Connect are defined in Section 2.1.2 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].

The Authorization Server MAY fully or partially ignore the scope values requested by the Client based on the Authorization Server policy or the End-User's instructions. A Client may elect to only request a subset of the information available from the UserInfo Endpoint.

The following is a non-normative example of a scope parameter in an Authorization Request:

scope=openid profile email phone


 TOC 

2.2.  Protocol Flows

Authorization Requests follow two main paths to obtain Access Tokens and ID Tokens, the Implicit Flow and the Authorization Code Flow. The flows determine how the Access Token and ID Token are returned to the Client. Access Tokens are credentials used to access Protected Resources, as defined in section 1.4 of OAuth 2.0 (Hammer, E., Ed., Recordon, D., and D. Hardt, “OAuth 2.0 Authorization Protocol,” March 2012.) [OAuth2.0]. Access Tokens represent a Resource Owner's authorization and MUST NOT be exposed to unauthorized parties.

The Implicit Flow is mainly used by Clients implemented in a browser using a scripting language. The Access Token and ID Token are returned directly to the Client, which MAY expose them to the Resource Owner and other applications that have access to the Resource Owner's User-Agent. The Authorization Server does not perform Client authentication before issuing the Access Token.

The Authorization Code Flow returns an Authorization Code to the Client, which can then exchange it for an Access Token directly. This provides the added benefit of not exposing the Access Token to the Resource Owner and possibly other malicious applications with access to the Resource Owner's User-Agent. The Authorization Server can also authenticate the Client before exchanging the Authorization Code for an Access Token. The Authorization Code flow is suitable for Clients that can securely maintain a Client Secret between themselves and the Authorization Server whereas the Implicit flow is suitable for Clients that cannot.



 TOC 

2.2.1.  How to Get an Authorization Code, Access Token, and ID Token

The OAuth 2.0 specification documents two response types:

code
When supplied as the value for the response_type parameter, a successful response MUST include an Authorization Code as defined in the OAuth 2.0 specification. Both successful and error responses MUST be added as parameters to the query component of the response. All tokens are returned from the Token Endpoint. Authorization Servers MUST support this response_type.
token
When supplied as the value for the response_type parameter, a successful response MUST include an Access Token as defined in the OAuth 2.0 specification. Both successful and error responses MUST be fragment-encoded. No ID Token is provided to the Client.

OpenID Connect supports these additional response types (de Medeiros, B., Scurtescu, M., and P. Tarjan, “OAuth 2.0 Multiple Response Type Encoding Practices,” April 2012.) [OAuth.Responses] that have been registered:

id_token
When supplied as the value for the response_type parameter, a successful response MUST include an ID Token. Both successful and error responses SHOULD be fragment-encoded. Authorization Servers SHOULD support this response_type.
id_token token
When supplied as the value for the response_type parameter, a successful response MUST include both an Access Token as well as an ID Token. Both successful and error responses SHOULD be fragment-encoded. Authorization Servers MUST support this response_type.
code token
When supplied as the value for the response_type parameter, a successful response MUST include both an Access Token and an Authorization Code as defined in the OAuth 2.0 specification. Both successful and error responses SHOULD be fragment-encoded.
code id_token
When supplied as the value for the response_type parameter, a successful response MUST include both an Authorization Code as well as an ID Token. Both successful and error responses SHOULD be fragment-encoded.
code id_token token
When supplied as the value for the response_type parameter, a successful response MUST include an Authorization Code, an ID Token, and an Access Token. Both successful and error responses SHOULD be fragment-encoded.

The Authorization Server MUST support both the code and the 'id_token token' response_type.

The Client may request any OAuth 2.0 registered response type supported by the Authorization Server.



 TOC 

2.2.2.  Authorization Code Flow

The Authorization Code Flow goes through the following steps.

  1. Client prepares an Authorization Request containing the desired request parameters.
  2. Client sends a request to the Authorization Server.
  3. Authorization Server Authenticates the End-User.
  4. Authorization Server Obtains the End-User Consent/Authorization.
  5. Authorization Server Sends the End-User back to the Client with an Authorization Code.
  6. Client requests a response using the Authorization Code at the Token Endpoint (Token Endpoint).
  7. Client receives a response that contains an Access Token and ID Token in the response body.
  8. (OPTIONAL) Client validates the ID Token at the Check ID Endpoint (Check ID Endpoint).
  9. (OPTIONAL) Client receives ID Token Response with the End-User's identifier.
  10. (OPTIONAL) Client accesses the UserInfo Endpoint (UserInfo Endpoint) with the Access Token.
  11. (OPTIONAL) Client receives UserInfo Response.

Note that in each step, the party that receives a message MUST verify it according to the verification rule set in OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].



 TOC 

2.2.3.  Implicit Flow

The Implicit Flow follows the following steps:

  1. Client prepares an Authorization Request containing the desired request parameters.
  2. Client sends a request to the Authorization Server.
  3. Authorization Server Authenticates the End-User.
  4. Authorization Server Obtains the End-User Consent/Authorization.
  5. Authorization Server Sends the End-User back to the Client with an Access Token and an ID Token if requested.
  6. (OPTIONAL) Client validates the ID Token at the Check ID Endpoint (Check ID Endpoint).
  7. (OPTIONAL) Client receives ID Token Response with the End-User's identifier.
  8. (OPTIONAL) Client accesses the UserInfo Endpoint (UserInfo Endpoint) with the Access Token.
  9. (OPTIONAL) Client receives UserInfo Response.

Note that in each step, the party that receives a message MUST verify it according to the verification rule set in OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].



 TOC 

2.3.  Authorization Request

When the End-User wishes to access a Protected Resource, and the End-User Authorization has not yet been obtained, the Client prepares an Authorization Request to the Authorization Endpoint.

Authorization Servers MUST require the use of a transport-layer security mechanism at the Authorization Endpoint. The Authorization Server MUST support TLS 1.2 RFC 5246 (Dierks, T. and E. Rescorla, “The Transport Layer Security (TLS) Protocol Version 1.2,” August 2008.) [RFC5246] and/or TLS 1.0 [RFC2246] (Dierks, T. and C. Allen, “The TLS Protocol Version 1.0,” January 1999.) and MAY support other transport-layer mechanisms with equivalent security.

Authorization Servers MUST support the use of the HTTP "GET" and "POST" methods defined in RFC 2616 (Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “Hypertext Transfer Protocol -- HTTP/1.1,” June 1999.) [RFC2616] at the Authorization Endpoint.

Clients MAY use the HTTP "GET" or "POST" method to send the Authorization Request to the Authorization Server. If using the HTTP "GET" method, the request parameters are serialized using URI query string serialization (Query String Serialization). If using the HTTP "POST" method, the request parameters are serialized using form serialization (Form Serialization).



 TOC 

2.3.1.  Client Prepares an Authorization Request

The Client prepares an Authorization Request to the Authorization Endpoint with the request parameters using the HTTP "GET" or "POST" method. The scheme used in the Authorization URL MUST be HTTPS. The Client MUST perform a TLS/SSL server certificate check, per RFC 6125 (Saint-Andre, P. and J. Hodges, “Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS),” March 2011.) [RFC6125].

The required Authorization Request parameters are as follows:

response_type
An OAuth 2.0 registered response type that determines how the Authorization Response is returned to the Client. As described in How to Get an Authorization Code, Access Token, and ID Token (How to Get an Authorization Code, Access Token, and ID Token) , the following registered values are supported:
  • code
  • code id_token
  • id_token
  • token
  • token id_token
  • code token
  • code token id_token
client_id
The Client identifier.
scope
It MUST include openid as one of the space delimited ASCII strings. Other values that MAY be included are profile, and email, address. The values specify an additive list of Claims that are returned by the UserInfo Endpoint as described by OpenID Connect Scopes (OpenID Connect Scopes).
redirect_uri
A redirection URI where the response will be sent. The Scheme, Host, and Path segments of this URI MUST match one of the redirect_uris registered for the client_id in the OpenID Connect Dynamic Client Registration 1.0 (Sakimura, N., Bradley, J., and M. Jones, “OpenID Connect Dynamic Client Registration 1.0,” April 2012.) [OpenID.Registration] specification.
nonce
A string value used to associate a user agent session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified to the ID Token. One method is to store a random value as a signed session cookie, and pass the value in the nonce parameter. The nonce in the returned ID Token is compared to the signed session cookie to detect ID Token replay by third parties.

The request can contain the following OPTIONAL parameters:

state
An opaque value used to maintain state between the request and the callback.
request
A JWT (Jones, M., Balfanz, D., Bradley, J., Goland, Y., Panzer, J., Sakimura, N., and P. Tarjan, “JSON Web Token,” March 2012.) [JWT] encoded OpenID Request Object.
request_uri
A URL that points to an OpenID Request Object.
display
An ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User. Refer to Sec 2.1.2 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] for more information.
prompt
A space delimited list of ASCII strings that can contain the values login, consent, select_account, and none. Refer to OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] for more information.
id_token
A JWT ID Token passed to the Authorization server as a hint. Refer to OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] for more information.

There are three methods to construct and send the request to the Authorization Endpoint:

a.
Simple Request Method
b.
Request Parameter Method
c.
Request File Method

The Simple Request Method is used in simple cases when default UserInfo and ID Token Claims are desired.

The Request Parameter Method is used by sending an OpenID Request Object when the Client desires to retrieve a different set of UserInfo and ID Token Claims. The request parameter method also allows requests to be signed or encrypted.

The Request File Method works similar to the Request Parameter Method but differs in that it sends an URL as a reference to the OpenID Request Object. It enables large requests to be sent securely and compactly even on user agents with limited capabilities. Clients SHOULD use the Request File Method to minimize the request size.



 TOC 

2.3.1.1.  Simple Request Method

The Client prepares an Authorization Request to the Authorization Endpoint using the appropriate parameters. If using the HTTP "GET" method, the request parameters are serialized using URI query string serialization (Query String Serialization). If using the HTTP "POST" method, the request parameters are serialized using form serialization (Form Serialization).

The following is a non-normative example of an Authorization Request URL. Line wraps are for display purposes only.

https://server.example.com/op/authorize?
response_type=code%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj


 TOC 

2.3.1.1.1.  Client sends a request to the Authorization Server

Having constructed the Authorization Request, the Client sends it to the HTTPS End-User Authorization Endpoint. This MAY happen via HTTPS redirect, hyperlinking, or any other means of directing the User-Agent to the Authorization Endpoint URL.

Following is a non-normative example using HTTP redirect. Line wraps are for display purposes only.

HTTP/1.1 302 Found
Location: https://server.example.com/authorize?
response_type=code%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj


 TOC 

2.3.1.2.  Request Parameter Method

The Client prepares an Authorization Request to the Authorization Endpoint using the appropriate HTTP parameters serialization. The Client SHOULD construct the request using the HTTP "POST" method, but MAY use the HTTP "GET" method.

The Authorization Request MUST include the request parameter defined in the Client Prepares an Authorization Request (Client Prepares an Authorization Request) section. The Authorization Request MUST NOT include the request_uri parameter.

The request parameter is a JWT (Jones, M., Balfanz, D., Bradley, J., Goland, Y., Panzer, J., Sakimura, N., and P. Tarjan, “JSON Web Token,” March 2012.) [JWT] encoded OpenID Request Object that contains the Authorization Request and also specifies the content of the responses returned from the UserInfo and Check ID Endpoints. The JWT object MAY be signed or signed and encrypted via JWS (Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature,” March 2012.) [JWS] and JWE (Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” March 2012.) [JWE] respectively, thereby providing authentication, integrity, non-repudiation and/or confidentiality.

All Authorization Request parameters that are part of the Authorization Request excluding the request, request_uri, redirect_uri, state, client_id, and nonce parameters MUST also be JSON Serialized into the OpenID Request Object with the same values. This allows the Client to send signed and/or encrypted requests to the Authorization Server and maintain conformance to OAuth 2.0.

The client_id, redirect_uri, state, and nonce parameters MAY also be included in the OpenID Request Object.

The following is a non-normative example of an OpenID Request Object before JWT encoding:

{
 "response_type": "code id_token",
 "client_id": "s6BhdRkqt3",
 "redirect_uri": "https://client.example.com/cb",
 "scope": "openid profile",
 "state": "af0ifjsldkj",
 "nonce": "n-0S6_WzA2Mj",
 "userinfo":
   {
     "claims":
       {
         "name": null,
         "nickname": {"optional": true},
         "email": null,
         "verified": null,
         "picture": {"optional": true}
       }
   },
 "id_token":
   {
     "max_age": 86400,
     "claims:{"acr": {"values":["2"]}}
   }
}

The following is a non-normative example of a JWT (Jones, M., Balfanz, D., Bradley, J., Goland, Y., Panzer, J., Sakimura, N., and P. Tarjan, “JSON Web Token,” March 2012.) [JWT] encoded OpenID Request Object. Line wraps within the values are for display purposes only.

JWT algorithm = HS256
HMAC HASH Key = 'aaa'

JSON Encoded Header = "{"alg":"HS256","typ":"JWT"}"
JSON Encoded Payload = "{"response_type":"code id_token",
    "client_id":"s6BhdRkqt3",
    "redirect_uri":"https://client.example.com/cb",
    "scope":"openid profile",
    "state":"af0ifjsldkj",
    "nonce":"n-0S6_WzA2Mj",
    "userinfo":{"claims":{"name":null,"nickname":{"optional":true},
        "email":null,"verified":null,
        "picture":{"optional":true}}},
    "id_token":{"max_age":86400,"claims":{"acr":{"values":["2"]}}}

JWT = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNwb25zZV90eXBlIjoiY29kZ
    SBpZF90b2tlbiIsImNsaWVudF9pZCI6InM2QmhkUmtxdDMiLCJyZWRpcmVjdF91cmkiO
    iJodHRwczpcL1wvY2xpZW50LmV4YW1wbGUuY29tXC9jYiIsInNjb3BlIjoib3BlbmlkI
    HByb2ZpbGUiLCJzdGF0ZSI6ImFmMGlmanNsZGtqIiwibm9uY2UiOiJuLTBTNl9XekEyT
    WoiLCJ1c2VyaW5mbyI6eyJjbGFpbXMiOnsibmFtZSI6bnVsbCwibmlja25hbWUiOnsib
    3B0aW9uYWwiOnRydWV9LCJlbWFpbCI6bnVsbCwidmVyaWZpZWQiOm51bGwsInBpY3R1c
    mUiOnsib3B0aW9uYWwiOnRydWV9fX0sImlkX3Rva2VuIjp7Im1heF9hZ2UiOjg2NDAwL
    CJjbGFpbXMiOnsiYWNyIjp7InZhbHVlcyI6WyIyIl19fX19.ou2Yc1B9a5iZLqbzBxE9
    5aNS0pSfRClCqM77n85ehGo

The following is a non-normative example of an Authorization Request with the OpenID Request Method. Line wraps within the values are for display purposes only.

https://server.example.com/authorize?
response_type=code%02id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&state=af0ifjsldkj
&nonce=n-0S6_WzA2Mj
&request=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNwb25zZV90eXBlIjoiY2
9kZSBpZF90b2tlbiIsImNsaWVudF9pZCI6InM2QmhkUmtxdDMiLCJyZWRpcmVjdF91cmkiOi
JodHRwczpcL1wvY2xpZW50LmV4YW1wbGUuY29tXC9jYiIsInNjb3BlIjoib3BlbmlkIHByb2
ZpbGUiLCJzdGF0ZSI6ImFmMGlmanNsZGtqIiwibm9uY2UiOiJuLTBTNl9XekEyTWoiLCJ1c2
VyaW5mbyI6eyJjbGFpbXMiOnsibmFtZSI6bnVsbCwibmlja25hbWUiOnsib3B0aW9uYWwiOn
RydWV9LCJlbWFpbCI6bnVsbCwidmVyaWZpZWQiOm51bGwsInBpY3R1cmUiOnsib3B0aW9uYW
wiOnRydWV9fX0sImlkX3Rva2VuIjp7Im1heF9hZ2UiOjg2NDAwLCJjbGFpbXMiOnsiYWNyIj
p7InZhbHVlcyI6WyIyIl19fX19.ou2Yc1B9a5iZLqbzBxE95aNS0pSfRClCqM77n85ehGo


 TOC 

2.3.1.2.1.  Client Sends a Request to the Authorization Server

Having constructed the Authorization Request, the Client sends it to the HTTPS Authorization Endpoint. This MAY happen via HTTPS redirect, hyperlinking, or any other means of directing the User-Agent to the Authorization Endpoint.

Following is a non-normative example using HTTP redirect. Line wraps are for display purposes only.

HTTP/1.1 302 Found
Location: https://server.example.com/authorize?
response_type=code%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&state=af0ifjsldkj
&nonce=n-0S6_WzA2Mj
&request=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNwb25zZV90eXBlIjoiY2
9kZSBpZF90b2tlbiIsImNsaWVudF9pZCI6InM2QmhkUmtxdDMiLCJyZWRpcmVjdF91cmkiOi
JodHRwczpcL1wvY2xpZW50LmV4YW1wbGUuY29tXC9jYiIsInNjb3BlIjoib3BlbmlkIHByb2
ZpbGUiLCJzdGF0ZSI6ImFmMGlmanNsZGtqIiwibm9uY2UiOiJuLTBTNl9XekEyTWoiLCJ1c2
VyaW5mbyI6eyJjbGFpbXMiOnsibmFtZSI6bnVsbCwibmlja25hbWUiOnsib3B0aW9uYWwiOn
RydWV9LCJlbWFpbCI6bnVsbCwidmVyaWZpZWQiOm51bGwsInBpY3R1cmUiOnsib3B0aW9uYW
wiOnRydWV9fX0sImlkX3Rva2VuIjp7Im1heF9hZ2UiOjg2NDAwLCJjbGFpbXMiOnsiYWNyIj
p7InZhbHVlcyI6WyIyIl19fX19.ou2Yc1B9a5iZLqbzBxE95aNS0pSfRClCqM77n85ehGo


 TOC 

2.3.1.3.  Request File Method

The Request File Method differs from the other methods in that it uses a Request File that contains an OpenID Request Object. It then sends the Request File URL as part of the Authorization Request.

The Client prepares an Authorization Request using the desired HTTP "GET" or "POST" method. The Client SHOULD use the HTTP "GET" method, but MAY use the HTTP "POST" method. The scheme used in the Authorization URL MUST be HTTPS. The Client MUST perform a TLS/SSL server certificate check, per RFC 6125 (Saint-Andre, P. and J. Hodges, “Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS),” March 2011.) [RFC6125].

The Authorization Request MUST NOT include the request parameter. The Authorization Request MUST include the request_uri parameter. The target of the URL is a JWT that is an OpenID Request Object. The scheme used in the request_uri value MUST be HTTPS, unless the target JWT is signed in a way that is verifiable by the Authorization server. The request_uri value MUST be reachable by the Authorization Server, and SHOULD be reachable by the Client.

Following is a non-normative example of a Request File. Line wraps are for display purposes only.

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNwb25zZV90eXBlIjoiY29kZSBpZF9
0b2tlbiIsImNsaWVudF9pZCI6InM2QmhkUmtxdDMiLCJyZWRpcmVjdF91cmkiOiJodHRwczp
cL1wvY2xpZW50LmV4YW1wbGUuY29tXC9jYiIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUiLCJ
zdGF0ZSI6ImFmMGlmanNsZGtqIiwibm9uY2UiOiJuLTBTNl9XekEyTWoiLCJ1c2VyaW5mbyI
6eyJjbGFpbXMiOnsibmFtZSI6bnVsbCwibmlja25hbWUiOnsib3B0aW9uYWwiOnRydWV9LCJ
lbWFpbCI6bnVsbCwidmVyaWZpZWQiOm51bGwsInBpY3R1cmUiOnsib3B0aW9uYWwiOnRydWV
9fX0sImlkX3Rva2VuIjp7Im1heF9hZ2UiOjg2NDAwLCJjbGFpbXMiOnsiYWNyIjp7InZhbHV
lcyI6WyIyIl19fX19.ou2Yc1B9a5iZLqbzBxE95aNS0pSfRClCqM77n85ehGo


 TOC 

2.3.1.3.1.  Client Generates the URL of the Request File

The Client then stores the Request File either locally or remotely. This is the Request URI, "request_uri". The URI MAY be appended with the base64url encoded SHA-256 [FIPS180-2] hash of the file after "#" so that the Authorization Server can detect whether the file has changed.

It should be noted that if the Request File includes user's attribute values, it MUST NOT be revealed to anybody but the Authorization Server. As such, the "request_uri" MUST have appropriate entropy for its lifetime, and must be removed after successful authentication or a reasonable timeout.

The Client then records the Request File either locally or remotely and obtains the Request File URI, "request_uri".

Following is a non-normative example. Line wraps are for display purposes only.

https://client.example.com/rf.jwt
#959w6lFunlMyjSaxmW0FtqvkRsmCaAIWuwl6QKeY89g


 TOC 

2.3.1.3.2.  Client Sends a Request to Authorization Server via HTTPS Redirect

The Client sends the Authorization Request to the Authorization Endpoint.

The entire URL MUST NOT exceed 512 bytes.

Following is a non-normative example. Line wraps are for display purposes only.

HTTP/1.1 302 Found
Location: https://server.example.com/authorize
?response_type=code%20id_token
&client_id=s6BhdRkqt3
&request_uri=https%3A%2F%2Fclient.example.com%2Frf.jwt
%23959w6lFunlMyjSaxmW0FtqvkRsmCaAIWuwl6QKeY89g
&state=af0ifjsldkj&nonce=n-0S6_WzA2Mj&scope=openid


 TOC 

2.3.1.3.3.  Authorization Server Fetches the Request File

Upon receipt of the Request, the Authorization Server MUST send a GET request to the request_uri to retrieve the content unless it is already cached and parse it to recreate the Authorization Request parameters.

Note that the RP SHOULD use a unique URI for each request utilizing distinct parameters, or otherwise prevent the Authorization Server from caching the request_uri.

Following is a non-normative example of this fetch process:

GET /rf.jwt HTTP/1.1
Host: client.example.com


 TOC 

2.3.2.  Authorization Server Validates Request Object

The Authorization Server validates the request according to the Section 5.1 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].



 TOC 

2.3.3.  Authorization Server Authenticates the End-User

The Authorization Server validates the request to ensure all required parameters are present and valid. If the request is valid, the Authorization Server MUST authenticate the End-User. The way in which the Authorization Server authenticates the End-User (e.g. username and password login, session cookies) is beyond the scope of this specification. An authentication user interface MAY be displayed by the Authorization Server depending on the authentication method used.

The Authorization Server MUST attempt to authenticate the End-User in the following cases:

The Authorization Server MUST NOT attempt authentication in the following cases:



 TOC 

2.3.4.  Authorization Server Obtains the End-User Consent/Authorization

Once the End-User is authenticated, the Authorization Server MUST obtain an authorization decision. This MAY be done by presenting the End-User with a dialogue that allows the End-User to recognize what he is consenting to and obtain his consent or by establishing consent via other means (for example, via previous administrative consent).

The Authorization Server MUST attempt to request authorization from the End-User in the following cases:

The Authorization Server MUST NOT request End-User authorization in the following cases:



 TOC 

2.3.5.  Authorization Server Sends the End-User Back to the Client

Once the authorization is determined, the Authorization Server returns a successful or error response.



 TOC 

2.3.5.1.  End-User Grants Authorization

If the Resource Owner grants the access request, the Authorization Server issues an Authorization Response and delivers it to the Client by adding the response parameters to redirect_uri specified in the Authorization Request using the "application/x-www-form-urlencoded" format.

If the response_type parameter in the Authorization Request includes the string value code, the following response parameters are included:

code
REQUIRED. The Authorization Code.

Upon receipt of the "code", the Client requests a response that includes the "access_token" and other variables. The requests and responses are described in the Token Endpoint (Token Endpoint) section.

If the response_type parameter in the Authorization Request includes the string value token, the following response parameters are included:

access_token
REQUIRED. The Access Token.
token_type
REQUIRED. This specification only supports the Bearer Token (Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.) [OAuth.Bearer] scheme. As such, this value MUST be set to "Bearer".
expires_in
OPTIONAL. The lifetime in seconds of the Access Token.
scope
OPTIONAL. The scope values of the issued Access Token.

If the response_type parameter in the Authorization Request includes the string value id_token, the following response parameters are returned:

id_token
REQUIRED. The ID Token of the for the authentication session.

The response parameters MAY also be include:

state
REQUIRED if the state parameter is present in the Authorization Request. Set it to the exact value of the state parameter received from the Client.

No other parameter SHOULD be returned.

If the response_type parameter in the Authorization Request includes the string value token or id_token, all response parameters SHOULD be added to the fragment component of the redirection URI. Otherwise, the response parameters are added to the query component of the redirection URI.

The following are non-normative examples of requests with differing response_type values and their responses. Line wraps are for display purposes only.

https://server.example.com/op/authorize?
response_type=code
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj


HTTP/1.1 302 Found
Location: https://client.example.com/cb?
code=Qcb0Orv1zh30vL1MPRsbm-diHiMwcLyZvn1arpZv-Jxf_11jnpEX3Tgfvk
&state=af0ifjsldkj
https://server.example.com/op/authorize?
response_type=token%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj


HTTP/1.1 302 Found
Location: https://client.example.com/cb#
access_token=jHkWEdUXMU1BwAsC4vtUsZwnNvTIxEl0z9K3vx5KF0Y
&token_type=Bearer
&id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zZ
XJ2ZXIuZXhhbXBsZS5jb20iLCJ1c2VyX2lkIjoiMjQ4Mjg5NzYxMDAxIiwiYXVkIjoiaHR0c
DpcL1wvY2xpZW50LmV4YW1wbGUuY29tIiwiZXhwIjoxMzExMjgxOTcwfQ.eDesUD0vzDH3T1
G3liaTNOrfaeWYjuRCEPNXVtaazNQ
&state=af0ifjsldkj
https://server.example.com/op/authorize?
response_type=code%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj


HTTP/1.1 302 Found
Location: https://client.example.com/cb#
code=Qcb0Orv1zh30vL1MPRsbm-diHiMwcLyZvn1arpZv-Jxf_11jnpEX3Tgfvk
&id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zZ
XJ2ZXIuZXhhbXBsZS5jb20iLCJ1c2VyX2lkIjoiMjQ4Mjg5NzYxMDAxIiwiYXVkIjoiaHR0c
DpcL1wvY2xpZW50LmV4YW1wbGUuY29tIiwiZXhwIjoxMzExMjgxOTcwfQ.eDesUD0vzDH3T1
G3liaTNOrfaeWYjuRCEPNXVtaazNQ
&state=af0ifjsldkj
https://server.example.com/op/authorize?
response_type=token%20code
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj


HTTP/1.1 302 Found
Location: https://client.example.com/cb#
code=Qcb0Orv1zh30vL1MPRsbm-diHiMwcLyZvn1arpZv-Jxf_11jnpEX3Tgfvk
&access_token=jHkWEdUXMU1BwAsC4vtUsZwnNvTIxEl0z9K3vx5KF0Y
&token_type=Bearer
&state=af0ifjsldkj
https://server.example.com/op/authorize?
response_type=token%20code%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb
&scope=openid
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj


HTTP/1.1 302 Found
Location: https://client.example.com/cb#
code=Qcb0Orv1zh30vL1MPRsbm-diHiMwcLyZvn1arpZv-Jxf_11jnpEX3Tgfvk
&access_token=jHkWEdUXMU1BwAsC4vtUsZwnNvTIxEl0z9K3vx5KF0Y
&token_type=Bearer
&id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zZ
XJ2ZXIuZXhhbXBsZS5jb20iLCJ1c2VyX2lkIjoiMjQ4Mjg5NzYxMDAxIiwiYXVkIjoiaHR0c
DpcL1wvY2xpZW50LmV4YW1wbGUuY29tIiwiZXhwIjoxMzExMjgxOTcwfQ.eDesUD0vzDH3T1
G3liaTNOrfaeWYjuRCEPNXVtaazNQ
&state=af0ifjsldkj


 TOC 

2.3.5.2.  End-User Denies Authorization or Invalid Request

If the End-User denies the authorization or the user authentication fails, the Authorization Server MUST return the error authorization response as defined in OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages]. The Authorization Server returns the Client to the redirection URI specified in the Authorization Request with the appropriate error parameters. No other parameters SHOULD be returned.

The error response parameters are the following:

error
REQUIRED. The error code.
error_description
OPTIONAL. A human-readable UTF-8 encoded text description of the error.
error_uri
OPTIONAL. A URI to a web page that includes additional information about the error.
state
REQUIRED if the Authorization Request included the state parameter. Set to the exact value received from the Client.

If the response_type parameter in the Authorization Request includes the string value token or id_token, all error response parameters SHOULD be added to the fragment component of the redirection URI. Otherwise, the response parameters are added to the query component of the redirection URI.

The following is a non-normative example. Line wraps after the second line are for the display purposes only.

HTTP/1.1 302 Found
Location: https://client.example.com/cb?
error=invalid_request
&error_description=the%20request%20is%20not%20valid%20or%20malformed
&state=af0ifjsldkj


 TOC 

3.  Token Endpoint

The Token Endpoint handles requests for retrieving and refreshing Access Tokens as well as ID Token and other variables.

Clients MUST use the HTTP "POST" method to make requests to the Token Endpoint. Request parameters are added using form serialization (Form Serialization).

Clients MAY provide authentication parameters in the request to the Token Endpoint as described in section 2.2.1 of OpenID Connect Messages (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages]

Authorization Servers MUST support the use of the HTTP "POST" method defined in RFC 2616 (Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “Hypertext Transfer Protocol -- HTTP/1.1,” June 1999.) [RFC2616] at the Token Endpoint.

Authorization Servers MUST require the use of a transport-layer security mechanism. The Authorization Server MUST support TLS 1.2 RFC 5246 (Dierks, T. and E. Rescorla, “The Transport Layer Security (TLS) Protocol Version 1.2,” August 2008.) [RFC5246] and/or TLS 1.0 [RFC2246] (Dierks, T. and C. Allen, “The TLS Protocol Version 1.0,” January 1999.) and MAY support other transport-layer mechanisms with equivalent security.

All Token Endpoint responses that contain tokens, secrets, or other sensitive information MUST include the following HTTP response header fields and values:



Header NameHeader Value
Cache-Control no-store
Pragma no-cache

 HTTP Response Headers and Values 



 TOC 

3.1.  Requesting an Access Token

To retrieve an Access Token, a Client MUST have an Authorization Code obtained via the method as described in Authorization Code Flow (Authorization Code Flow).



 TOC 

3.1.1.  Access Token Request

To obtain an Access Token, Refresh Token or ID Token, the Client MUST authenticate to the Token Endpoint using the authentication method registered for its client_id, as documented in Section 2.2.1 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] The Client sends the parameters via HTTPS POST to the Token Endpoint using form serialization (Form Serialization) as specified in Section 4.1.3 of OAuth 2.0 (Hammer, E., Ed., Recordon, D., and D. Hardt, “OAuth 2.0 Authorization Protocol,” March 2012.) [OAuth2.0]:

The following is a non-normative example:

POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

grant_type=authorization_code&code=SplxlOBeZQQYbYS6WxSbIA
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb

The Authorization Server MUST:



 TOC 

3.1.2.  Access Token Response

Upon receipt of the Token Request, the Authorization Server MUST return either a successful response or an error response that corresponds to the received Authorization Code.

A successful response returns the "application/json" media type and the response body is the Access Token Response documented in Sec 2.2.3 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].

Following is a non-normative example of a successful response:

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache

{
 "access_token": "SlAV32hkKG",
 "token_type": "Bearer",
 "refresh_token": "8xLOxBtZp8",
 "expires_in": 3600,
 "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOl
wvXC9zZXJ2ZXIuZXhhbXBsZS5jb20iLCJ1c2VyX2lkIjoiMjQ4Mjg5NzYxMDAxIiwiYXVkIj
oiaHR0cDpcL1wvY2xpZW50LmV4YW1wbGUuY29tIiwiZXhwIjoxMzExMjgxOTcwfQ.eDesUD0
vzDH3T1G3liaTNOrfaeWYjuRCEPNXVtaazNQ"
}


 TOC 

3.1.3.  Access Token Error Response

If the Token Request is invalid or unauthorized, the Authorization Server constructs the response by returning the Token Error Response defined in OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] in the entity body of the HTTP response using the application/json media type with HTTP response code 400.

Following is a non-normative example:

HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache

{
 "error": "invalid_request"
}


 TOC 

3.2.  Refreshing an Access Token

To refresh an Access Token, the Client MUST authenticate to the Token Endpoint using the authentication method registered for its client_id, as documented in Section 2.2.1 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] The Client sends the parameters via HTTPS POST to the Token Endpoint using form serialization (Form Serialization) as specified in Section 6 of OAuth 2.0 (Hammer, E., Ed., Recordon, D., and D. Hardt, “OAuth 2.0 Authorization Protocol,” March 2012.) [OAuth2.0]:

The Authorization Server MUST verify the validity of the Refresh Token.



 TOC 

3.2.1.  Refresh Token Response

Upon receipt of the Refresh Token Request, the Authorization Server MUST return either a successful response or an error response that corresponds to the received Refresh Token.

Upon successful verification of the Refresh Token, a successful response returns the "application/json" media type and the response body is the Access Token Response of Section 2.2.3 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] except that it MUST NOT return id_token.

Following is a non-normative example of the Refresh Token request and response:

POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

client_id=s6BhdRkqt3
&client_secret=some_secret12345
&grant_type=refresh_token
&refresh_token=8xLOxBtZp8
&scope=openid profile


HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache

{
 "access_token": "TlBN45jURg",
 "token_type": "Bearer",
 "refresh_token": "9yNOxJtZa5",
 "expires_in": 3600
}


 TOC 

3.2.2.  Refresh Token Error Response

If the Refresh Token Request is invalid or unauthorized, the Authorization Server returns the Token Error Response as defined in Section 5.2 of OAuth 2.0 (Hammer, E., Ed., Recordon, D., and D. Hardt, “OAuth 2.0 Authorization Protocol,” March 2012.) [OAuth2.0].



 TOC 

4.  Check ID Endpoint

The Check ID Endpoint validates the ID Token and returns a text JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] object containing the Claims in the ID Token. This endpoint is used by Clients that are not able to or do not wish to directly process ID Tokens. In this case, Clients MAY treat ID Tokens as opaque values.

Check ID Endpoints MUST require the use of a transport-layer security mechanism. The endpoint MUST support TLS 1.2 RFC 5246 (Dierks, T. and E. Rescorla, “The Transport Layer Security (TLS) Protocol Version 1.2,” August 2008.) [RFC5246] and/or TLS 1.0 [RFC2246] (Dierks, T. and C. Allen, “The TLS Protocol Version 1.0,” January 1999.); when TLS is used, the Client MUST perform a TLS/SSL server certificate check, per RFC 6125 (Saint-Andre, P. and J. Hodges, “Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS),” March 2011.) [RFC6125]. Check ID Endpoints MAY support other transport-layer mechanisms with equivalent security.



 TOC 

4.1.  Check ID Request

To request the information about the authentication performed on the End-User, a request is made to the Check ID Endpoint sending the ID Token as the access_token by using the OAuth 2.0 Bearer (Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.) [OAuth.Bearer] scheme.

Clients MAY send requests with the following parameter to the Check ID Endpoint:

access_token
REQUIRED. The ID Token obtained from an OpenID Connect Authorization Request. This parameter MUST NOT be sent if the Access Token is sent in the HTTP Authorization header as described in Section 7.1 of OAuth 2.0 (Hammer, E., Ed., Recordon, D., and D. Hardt, “OAuth 2.0 Authorization Protocol,” March 2012.) [OAuth2.0]. Access Tokens sent in the authorization header MUST be Bearer Tokens (Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.) [OAuth.Bearer].

The Following is a non-normative example of a Check ID request:

POST /check_id HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC
9zZXJ2ZXIuZXhhbXBsZS5jb20iLCJ1c2VyX2lkIjoiMjQ4Mjg5NzYxMDAxIiwiYXVkIjoiaH
R0cDpcL1wvY2xpZW50LmV4YW1wbGUuY29tIiwiZXhwIjoxMzExMjgxOTcwfQ.eDesUD0vzDH
3T1G3liaTNOrfaeWYjuRCEPNXVtaazNQ

The Client MUST ensure that the Check ID Endpoint being used is the trusted Check ID Endpoint for the Entity via pre-configuration meta-data or discovery.

A request to the Check ID Endpoint MAY alternatively be made with the HTTP "GET" method, when using GET the access_token MUST be passed in the header.

The Authorization Server MUST verify the request in accordance with the section 5.3 of the Messages (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] specification.

Authorization Servers SHOULD support the use of Cross Origin Resource Sharing (CORS) (van Kestern, “Cross-Origin Resource Sharing,” July 2010.) [CORS] and or other methods as appropriate to enable Java Script Clients to access the endpoint.



 TOC 

4.2.  Check ID Response

The Check ID Endpoint MUST return the JSON serialized Claims associated with the ID Token as described in Check ID Response section of OpenID Messages (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] in the HTTP response body. The content-type of the HTTP response MUST be set to application/json.

The following is a non-normative example of a response from a Check ID Endpoint:

HTTP/1.1 200 OK
Content-Type: application/json

{
 "iss": "http://server.example.com",
 "user_id": "248289761001",
 "aud": "s6BhdRkqt3",
 "nonce": "n-0S6_WzA2Mj",
 "exp": 1311281970,
 "iat": 1311280970
}


 TOC 

4.2.1.  Check ID Response Verification

To verify the validity of the Response, the Client MUST do the following:

  1. Check that the OP that responded was really the intended OP through a TLS/SSL server certificate check, per RFC 6125 (Saint-Andre, P. and J. Hodges, “Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS),” March 2011.) [RFC6125].
  2. Follow the rules in section 5.4 of the OpenID Connect Messages.


 TOC 

4.3.  Check ID Error Response

When an error condition occurs, the Check ID Endpoint returns an Error Response as defined in Section 3 of OAuth 2.0 Bearer Tokens (Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.) [OAuth.Bearer].

Following is a non-normative example of an error response:

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="example.com",
                     error="invalid_token",
                     error_description="The ID token expired"


 TOC 

5.  UserInfo Endpoint

To obtain the requested Claims about the End-User, the Client makes a GET or POST request to the UserInfo Endpoint as in OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].

Authorization Servers MUST require the use of a transport-layer security mechanism. The Authorization Server MUST support TLS 1.2 RFC 5246 (Dierks, T. and E. Rescorla, “The Transport Layer Security (TLS) Protocol Version 1.2,” August 2008.) [RFC5246] and/or TLS 1.0 [RFC2246] (Dierks, T. and C. Allen, “The TLS Protocol Version 1.0,” January 1999.) and MAY support other transport-layer mechanisms with equivalent security.

Authorization Servers MUST support the use of the HTTP "GET" and HTTP "POST" methods defined in RFC 2616 (Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “Hypertext Transfer Protocol -- HTTP/1.1,” June 1999.) [RFC2616] at the UserInfo Endpoint.

Authorization Servers MUST accept Access Tokens as Bearer Tokens (Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.) [OAuth.Bearer].

Authorization Servers SHOULD support the use of Cross Origin Resource Sharing (CORS) (van Kestern, “Cross-Origin Resource Sharing,” July 2010.) [CORS] and or other methods as appropriate to enable Java Script Clients to access the endpoint.



 TOC 

5.1.  UserInfo Request

Client SHOULD send the UserInfo Request defined in section 2.4.1 of the OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] either in HTTP GET or POST request.

The Access Token obtained from an OpenID Connect Authorization Request MUST be sent as a Bearer Token. Section 2 of the OAuth 2.0 Bearer Tokens (Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.) [OAuth.Bearer] specification documents the permissible methods of sending the Access Token.

It is RECOMMENDED that the Client use the authorization header method for all requests using GET.

The following is a non-normative example:

GET /userinfo?schema=openid HTTP/1.1
Host: server.example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ ... fQ.8Gj_-sj ... _X


 TOC 

5.2.  UserInfo Response

The user_id Claim in the UserInfo Endpoint response MUST exactly match the user_id Claim in the ID Token, before using additional UserInfo Endpoint Claims.

Upon receipt of the UserInfo request, the UserInfo Endpoint MUST return the JSON Serialization of the UserInfo response as in OpenID Messages (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages] in the HTTP response body. The content-type of the HTTP response MUST be set to application/json if the response body is a text JSON structure. If the JSON response is signed or encrypted, then the content-type MUST be set to application/jwt.

Upon receipt of the UserInfo Response, the Client MUST verify the response in accordance with Section 5.5 (UserInfo Response Verification) of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].

Following is a non-normative example of such response:

HTTP/1.1 200 OK
Content-Type: application/json

{
 "user_id": "248289761001",
 "name": "Jane Doe"
 "given_name": "Jane",
 "family_name": "Doe",
 "email": "janedoe@example.com",
 "picture": "http://example.com/janedoe/me.jpg"
}


 TOC 

5.3.  UserInfo Error Response

When an error condition occurs, the UserInfo Endpoint returns an Error Response as defined in Section 3 of the OAuth 2.0 Bearer Tokens (Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.) [OAuth.Bearer] specification utilizing an error code as specified in Section 2.4.3 of OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].

Following is a non-normative example of an error response:

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="example.com",
                     error="invalid_token",
                     error_description="The access token expired"


 TOC 

6.  Discovery and Registration

Some OpenID Connect installations can use a pre-configured set of OpenID Providers and/or Relying Parties. In those cases, it may not be necessary to support dynamic discovery of information about identities or services or dynamic registration of Clients.

However, if installations choose to support unanticipated interactions between Relying Parties and OpenID Providers that do not have pre-configured relationships, they SHOULD accomplish this by implementing the facilities defined in the OpenID Connect Discovery 1.0 (Sakimura, N., Bradley, J., Jones, M., and E. Jay, “OpenID Connect Discovery 1.0,” April 2012.) [OpenID.Discovery] and OpenID Connect Dynamic Client Registration 1.0 (Sakimura, N., Bradley, J., and M. Jones, “OpenID Connect Dynamic Client Registration 1.0,” April 2012.) [OpenID.Registration] specifications.



 TOC 

7.  Serializations

A request message MAY be serialized using one of the following methods:

  1. Query String Serialization
  2. Form Serialization



 TOC 

7.1.  Query String Serialization

In order to serialize the parameters using the query string serialization, the Client constructs the string by adding the parameters and values to the query component of a URL using the application/x-www-form-urlencoded format as defined by [W3C.REC‑html401‑19991224] (Hors, A., Raggett, D., and I. Jacobs, “HTML 4.01 Specification,” December 1999.). Query string serialization is typically used in HTTP GET requests.

Following is a non-normative example of such serialization:

GET /authorize?scope=openid&response_type=code
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb HTTP/1.1
Host: server.example.com


 TOC 

7.2.  Form Serialization

Parameters and their values are form serialized by adding the parameter names and values to the entity body of the HTTP request using the application/x-www-form-urlencoded format as defined by [W3C.REC‑html401‑19991224] (Hors, A., Raggett, D., and I. Jacobs, “HTML 4.01 Specification,” December 1999.). Form serialization is typically used in HTTP POST requests.

Following is a non-normative example of such serialization:

POST /authorize HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

scope=openid&response_type=code
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb


 TOC 

8.  Security Considerations

This specification references the security considerations defined in OpenID Connect Messages 1.0 (Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.) [OpenID.Messages].

In addition, the following list of attack vectors and remedies are also considered.



 TOC 

8.1.  Implicit Grant Flow Threats

In the implicit grant flow, the Access Token is returned in the fragment part of the Client's redirect_uri through HTTPS, thus it is protected between the OP and the User-Agent, and User-Agent and the RP. The only the place it can be captured is the User-Agent where the TLS session is terminated, and is possible if the User-Agent is infested by malware.



 TOC 

9.  Privacy Considerations

The UserInfo response typically contains Personally Identifiable Information. As such, End-User consent for the release of the information for the specified purpose SHOULD be obtained at or prior to the authorization time in accordance with relevant regulations. The purpose of use is typically registered in association with the redirect_uri.

Only necessary UserInfo data should be stored at the Client and the Client SHOULD associate the received data with the purpose of use statement.

The Resource Server SHOULD make the UserInfo access log available to the End-User so that the End-User can monitor who accessed his data.

To protect the End-User from a possible correlation among Clients, the use of a Pairwise Pseudonymous Identifier (PPID) as the user_id SHOULD be considered.



 TOC 

10.  IANA Considerations



 TOC 

10.1.  OAuth Parameters Registry



 TOC 

10.1.1.  Authorization Request Parameter (display)

The following is a parameter registration request for the Authorization Request in this specification:



 TOC 

10.1.2.  Authorization Request Parameter (prompt)

The following is a parameter registration request for the Authorization Request in this specification:



 TOC 

10.1.3.  Authorization Request Parameter (nonce)

The following is a parameter registration request for the Authorization Request in this specification:



 TOC 

10.1.4.  Authorization Request Parameter (request)

The following is a parameter registration request for the Authorization Request in this specification:



 TOC 

10.1.5.  Authorization Request Parameter (request_uri)

The following is a parameter registration request for the Authorization Request in this specification:



 TOC 

10.1.6.  ID Token Response Parameters

The following is a parameter registration request for the ID Token Response in this specification:



 TOC 

10.2.  OAuth Extensions Error Registry



 TOC 

10.2.1.  Authorization Endpoint Error (invalid_redirect_uri)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

10.2.2.  Authorization Endpoint Error (interaction_required)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

10.2.3.  Authorization Endpoint Error (login_required)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

10.2.4.  Authorization Endpoint Error (session_selection_required)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

10.2.5.  Authorization Endpoint Error (consent_required)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

10.2.6.  Authorization Endpoint Error (invalid_request_uri)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

10.2.7.  Authorization Endpoint Error (invalid_openid_request_object)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

10.2.8.  UserInfo Endpoint Error (invalid_schema)

The following is an error registration request for the Authorization Error Response in this specification:



 TOC 

11.  References



 TOC 

11.1. Normative References

[JWE] Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” March 2012.
[JWS] Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature,” March 2012.
[JWT] Jones, M., Balfanz, D., Bradley, J., Goland, Y., Panzer, J., Sakimura, N., and P. Tarjan, “JSON Web Token,” March 2012.
[OAuth.Bearer] Jones, M., Hardt, D., and D. Recordon, “OAuth 2.0 Protocol: Bearer Tokens,” March 2012.
[OAuth.Responses] de Medeiros, B., Scurtescu, M., and P. Tarjan, “OAuth 2.0 Multiple Response Type Encoding Practices,” April 2012.
[OAuth2.0] Hammer, E., Ed., Recordon, D., and D. Hardt, “OAuth 2.0 Authorization Protocol,” March 2012.
[OpenID.Discovery] Sakimura, N., Bradley, J., Jones, M., and E. Jay, “OpenID Connect Discovery 1.0,” April 2012.
[OpenID.Messages] Sakimura, N., Recordon, D., Bradley, J., de Medeiros, B., Jones, M., and E. Jay, “OpenID Connect Messages 1.0,” April 2012.
[OpenID.Registration] Sakimura, N., Bradley, J., and M. Jones, “OpenID Connect Dynamic Client Registration 1.0,” April 2012.
[RFC2119] Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” BCP 14, RFC 2119, March 1997 (TXT, HTML, XML).
[RFC2246] Dierks, T. and C. Allen, “The TLS Protocol Version 1.0,” RFC 2246, January 1999 (TXT).
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “Hypertext Transfer Protocol -- HTTP/1.1,” RFC 2616, June 1999 (TXT, PS, PDF, HTML, XML).
[RFC4627] Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” RFC 4627, July 2006 (TXT).
[RFC5246] Dierks, T. and E. Rescorla, “The Transport Layer Security (TLS) Protocol Version 1.2,” RFC 5246, August 2008 (TXT).
[RFC6125] Saint-Andre, P. and J. Hodges, “Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS),” RFC 6125, March 2011 (TXT).
[W3C.REC-html401-19991224] Hors, A., Raggett, D., and I. Jacobs, “HTML 4.01 Specification,” World Wide Web Consortium Recommendation REC-html401-19991224, December 1999 (HTML).


 TOC 

11.2. Informative References

[CORS] van Kestern, “Cross-Origin Resource Sharing,” July 2010.


 TOC 

Appendix A.  Footnotes



 TOC 

A.1.  Example JWT Values

The JWT values used in the non-normative examples of this specification are only place holders for actual JWT values. The examples use "jwt_header.jwt_part2.jwt_part3" as the place holder value. For an example of an actual JWT, refer to the JWT (Jones, M., Balfanz, D., Bradley, J., Goland, Y., Panzer, J., Sakimura, N., and P. Tarjan, “JSON Web Token,” March 2012.) [JWT] specification.



 TOC 

Appendix B.  Acknowledgements

The OpenID Community would like to thank the following people for the work they've done in the drafting and editing of this specification.

Axel Nennker (axel.nennker@telekom.de), Deutsche Telekom

Breno de Medeiros (breno@gmail.com), Google

George Fletcher (gffletch@aol.com), AOL

Hideki Nara (hideki.nara@gmail.com), Takt Communications

John Bradley (ve7jtb@ve7jtb.com), Independent

Nat Sakimura (n-sakimura@nri.co.jp), Nomura Research Institute, Ltd.

Michael B. Jones (mbj@microsoft.com), Microsoft

Ryo Itou (ritou@yahoo-corp.jp), Yahoo! Japan



 TOC 

Appendix C.  Notices

Copyright (c) 2012 The OpenID Foundation.

The OpenID Foundation (OIDF) grants to any Contributor, developer, implementer, or other interested party a non-exclusive, royalty free, worldwide copyright license to reproduce, prepare derivative works from, distribute, perform and display, this Implementers Draft or Final Specification solely for the purposes of (i) developing specifications, and (ii) implementing Implementers Drafts and Final Specifications based on such documents, provided that attribution be made to the OIDF as the source of the material, but that such attribution does not indicate an endorsement by the OIDF.

The technology described in this specification was made available from contributions from various sources, including members of the OpenID Foundation and others. Although the OpenID Foundation has taken steps to help ensure that the technology is available for distribution, it takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this specification or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any independent effort to identify any such rights. The OpenID Foundation and the contributors to this specification make no (and hereby expressly disclaim any) warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to this specification, and the entire risk as to implementing this specification is assumed by the implementer. The OpenID Intellectual Property Rights policy requires contributors to offer a patent promise not to assert certain patent claims against other contributors and against implementers. The OpenID Foundation invites any interested party to bring to its attention any copyrights, patents, patent applications, or other proprietary rights that may cover technology that may be required to practice this specification.



 TOC 

Appendix D.  Document History

[[ To be removed from the final specification ]]

-09

-08

-07

-06

-05

-04

-03

-02

-01



 TOC 

Authors' Addresses

  Nat Sakimura
  Nomura Research Institute, Ltd.
Email:  n-sakimura@nri.co.jp
  
  John Bradley
  Independent
Email:  ve7jtb@ve7jtb.com
  
  Breno de Medeiros
  Google
Email:  breno@google.com
  
  Michael B. Jones
  Microsoft
Email:  mbj@microsoft.com
  
  Edmund Jay
  Illumila
Email:  ejay@mgi1.com