<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='http://xml.resource.org/authoring/rfc2629.xslt' ?>
<!DOCTYPE rfc PUBLIC "-//IETF//DTD RFC 2629//EN"
"http://xml.resource.org/authoring/rfc2629.dtd">
<rfc category="exp" docName="openid-connect-implicit-1_0" ipr="trust200902">

  <?rfc toc="yes" ?>
  <?rfc tocdepth="4" ?>
  <?rfc symrefs="yes" ?>
  <?rfc sortrefs="yes"?>
  <?rfc strict="no" ?>
  <?rfc iprnotified="no" ?>
  <?rfc private="Draft" ?>

  <front>
    <title abbrev="OpenID Connect Implicit Client Profile 1.0">OpenID Connect Implicit 
    Client Profile 1.0 - draft 02</title>

    <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
      <organization abbrev="NRI">Nomura Research Institute, Ltd.</organization>
      <address>
        <email>n-sakimura@nri.co.jp</email>
      </address>
    </author>

    <author fullname="John Bradley" initials="J." surname="Bradley">
      <organization abbrev="Ping Identity">Ping Identity</organization>
      <address>
        <email>ve7jtb@ve7jtb.com</email>
      </address>
    </author>

    <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
      <organization abbrev="Microsoft">Microsoft</organization>
      <address>
        <email>mbj@microsoft.com</email>
      </address>
    </author>

    <author fullname="Breno de Medeiros" initials="B." surname="de Medeiros">
      <organization abbrev="Google">Google</organization>
      <address>
        <email>breno@google.com</email>
      </address>
    </author>

    <author fullname="Chuck Mortimore" initials="C." surname="Mortimore">
      <organization abbrev="Salesforce">Salesforce</organization>
      <address>
        <email>cmortimore@salesforce.com</email>
      </address>
    </author>

    <author fullname="Edmund Jay" initials="E." surname="Jay">
      <organization abbrev="Illumila">Illumila</organization>
      <address>
        <email>ejay@mgi1.com</email>
      </address>
    </author>

    <date day="23" month="July" year="2012" />

    <abstract>
      <t>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.</t>

      <t>OpenID Connect Implicit Client Profile is a profile of the 
      OpenID Connect Standard 1.0 Specification
      that is designed to be easy to read and implement for basic
      web-based Relying Parties using the OAuth implicit grant type.
      OpenID Providers should consult the Standard specification.
      This profile omits implementation and security
      considerations for OpenID Providers.</t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction">

      <t>OpenID Connect Implicit Client Profile is a profile of the 
      <xref target="OpenID.Standard">OpenID Connect Standard 1.0 Specification</xref>
      that is designed to be easy to read and implement for basic
      web-based Relying Parties using the OAuth implicit grant type.
      See the
      <xref target="OpenID.Basic">OpenID Connect Basic Client Profile</xref>
      specification for a related profile for basic
      web-based Relying Parties using the OAuth code grant type.
      OpenID Providers and non web-based applications
      should consult the Standard specification.
      This profile omits implementation and security
      considerations for OpenID Providers.</t>

      <section anchor="rnc" title="Requirements Notation and Conventions">
	<t>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 <xref
	target="RFC2119"/>.</t>

	<t>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.</t>
      </section>

      <section anchor="terminology" title="Terminology"> 
        <t>
          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 <xref target="OAuth2.0">OAuth 2.0</xref>.
	  This specification also defines the following terms:
          <list style="hanging">
            <t hangText="Relying Party (RP)">
              Application requiring Claims from an OpenID Provider
            </t>
            <t hangText="OpenID Provider (OP)">
              Service capable of providing Claims to a Relying Party
            </t>
            <t hangText="Claim">
              Piece of information about an Entity that a Claims Provider
	      asserts about that Entity 
            </t>
            <t hangText="Claims Provider">
              Server that can return Claims about an Entity 
            </t>
            <t hangText="End-User">
              Human Resource Owner
            </t>
            <t hangText="Entity">
              Something that has a separate and distinct existence and that can be
	      identified in a context. An End-User is one example of an Entity 
            </t>
            <t hangText="Personally Identifiable Information (PII)">
              Information that (a) can be used to identify the natural person 
              to whom such information relates, or 
              (b) is or might be directly or indirectly linked to a 
              natural person to whom such information relates. 
            </t>
            <t hangText="Pairwise Pseudonymous Identifier (PPID)"> 
              Identifier that identifies the Entity to a Relying Party that cannot be correlated 
              with the Entity's PPID at another Relying Party 
            </t>
            <t hangText="ID Token">
              <xref target="JWT">JSON Web Token (JWT)</xref> that contains Claims about the authentication event
              <vspace /><vspace /><vspace />
            </t>
            <t hangText="Issuer">
              Entity that issues a set of Claims. 
            </t>
            <t hangText="Issuer Identifier">
              HTTPS URL that acts as a verifiable identifier for an Issuer 
            </t>
            <t hangText="UserInfo Endpoint">
              Protected resource that, when presented with an Access Token by the Client, returns authorized information about the End-User represented by the corresponding 
              Authorization Grant  
            </t>
          </list>
        </t>
      </section>
    </section>

    <section title="Protocol Flows">
      <t>Authorization Requests can follow one of two paths; the Implicit Flow
      or the Authorization Code Flow. 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. Clients that do not support TLS MUST
      use the Authorization Code Flow to prevent the interception of Access 
      Tokens.</t>

      <t>The OpenID Connect Implicit Client Profile only documents Clients using
      the Implicit Flow. OpenID Providers MUST support both flows.
      Clients wanting to use the Authorization Code Flow and OpenID Providers 
      should consult the <xref target="OpenID.Standard">OpenID Connect Standard 
      1.0 Specification</xref>.</t>

      <section title="OpenID Connect Scopes">
        <t>OpenID Connect Clients use <spanx style="verb">scope</spanx> values as defined in 3.3 of 
        <xref target="OAuth2.0">OAuth 2.0</xref> to specify what
        access privileges are requested for Access Tokens. The scopes associated
        with Access Tokens determine what resources will be available when they are 
        used to access OAuth 2.0 protected endpoints. For OpenID Connect, scopes
	can be used to request that specific sets of information
	be made available from the UserInfo Endpoint,
        and to request an ID Token.
        OAuth 2.0 allows additional scope values to be specified, as extensions.
        This specification describes only the scope values used by OpenID Connect.</t>

        <t>OpenID Connect defines the following <spanx style="verb">scope</spanx> values:</t>

        <t>
	  <list style="hanging">
	    <t hangText="openid">REQUIRED. Informs the Authorization
	    Server that the Client is making an OpenID Connect request. If the
	    <spanx style="verb">openid</spanx> scope value is not present,
	    the request MUST NOT be treated as an OpenID Connect request.
	    This scope value requests access to the <spanx style="verb">user_id</spanx>
	    Claim at the UserInfo Endpoint.</t>

	    <t hangText="profile">OPTIONAL. This scope value
	    requests that access to the End-User's default <xref
	    target="ClaimTable">profile Claims</xref> at the
	    UserInfo Endpoint be granted by the issued Access Token.
	    These claims are:

	    <spanx style="verb">name</spanx>,
	    <spanx style="verb">family_name</spanx>,
	    <spanx style="verb">given_name</spanx>,
	    <spanx style="verb">middle_name</spanx>,
	    <spanx style="verb">nickname</spanx>,
	    <spanx style="verb">preferred_username</spanx>,
	    <spanx style="verb">profile</spanx>,
	    <spanx style="verb">picture</spanx>,
	    <spanx style="verb">website</spanx>,
	    <spanx style="verb">gender</spanx>,
	    <spanx style="verb">birthday</spanx>,
	    <spanx style="verb">zoneinfo</spanx>,
	    <spanx style="verb">locale</spanx>, and
	    <spanx style="verb">updated_time</spanx>.</t>

	    <t hangText="email">OPTIONAL. This scope value requests that access to
	    the <spanx style="verb">email</spanx> and 
	    <spanx style="verb">email_verified</spanx> Claims at the
	    UserInfo Endpoint be granted by the issued Access Token.</t>

	    <t hangText="address">OPTIONAL. This scope value requests that access to
	    the <spanx style="verb">address</spanx> Claim at the
	    UserInfo Endpoint be granted by the issued Access Token.</t>

	    <t hangText="phone">OPTIONAL. This scope value requests that access to 
	    the <spanx style="verb">phone_number</spanx> Claim at the 
	    UserInfo Endpoint be granted by the issued Access Token.</t>

	  </list>
	</t>

        <t>Multiple scopes MAY be requested by creating a space delimited, case
        sensitive list of ASCII scope values.</t>
        
        <t>In some cases, the End-User will be given the option to
        have the OpenID Provider decline to provide some or all
        information requested by Clients.</t>

        <t>To increase new account activation, a Client may elect to
        only request a subset of the information available from the
        UserInfo Endpoint.</t>

        <t>
	  <figure>
            <preamble>The following is a non-normative example of a <spanx style="verb">scope</spanx>
            Request.</preamble>

            <artwork><![CDATA[scope=openid profile email phone]]></artwork>
          </figure>
	</t>
      </section>

      <section title="Implicit Flow">
        <t>The Implicit Flow consists of the following steps:</t>
        <t>
	  <list style="numbers">
            <t>Client prepares an Authorization Request containing the desired
            request parameters.</t>

            <t>Client sends a request to the Authorization Server.</t>

            <t>Authorization Server authenticates the End-User.</t>

            <t>Authorization Server obtains the End-User Consent/Authorization.</t>

            <t>Authorization Server sends the End-User back to the Client with
            an Access Token and ID Token.</t>
          </list>
	</t>

        <section anchor="rf_prep" title="Client Prepares an Authorization Request">
          <t>When the Client 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.</t>

          <t>The scheme used in the Authorization Endpoint URL MUST be HTTPS.</t>

          <t>Clients MAY construct the request using the HTTP
          <spanx style="verb">GET</spanx> or the HTTP 
          <spanx style="verb">POST</spanx> method as defined in 
          <xref target="RFC2616">RFC 2616</xref>.</t>

          <t>If using the HTTP <spanx style="verb">GET</spanx> method, the
          parameters are serialized using <xref target="qss">Query String 
          Serialization</xref>. If using the HTTP 
          <spanx style="verb">POST</spanx> method, the request parameters are 
          added to the HTTP request entity-body using the 
          <spanx style="verb">application/x-www-form-urlencoded</spanx> format
          as defined by <xref target="W3C.REC-html401-19991224"/>.</t>

          <t>This profile further constrains the following request
          parameters:</t>
          <t>
	    <list style="hanging">
              <t hangText="response_type">
		It MUST include <spanx style="verb">token</spanx> and
		<spanx style="verb">id_token</spanx>, as a space delimited list.
		This requests that both an Access Token and an ID Token be returned
		in the URL fragment of the response.
	      </t>
            </list>
	  </t>

          <t>Other REQUIRED parameters in the request include the
          following:</t>

          <t>
	    <list style="hanging">
              <t hangText="client_id">The OAuth 2.0 Client Identifier.</t>

              <t hangText="scope">It MUST include <spanx style="verb">openid</spanx>
              as one of the space delimited ASCII strings.
	      OPTIONAL <spanx style="verb">scope</spanx> strings of
              <spanx style="verb">profile</spanx>, <spanx style="verb">email</spanx>,
              <spanx style="verb">address</spanx>, and <spanx style="verb">phone</spanx>
	      are also supported.</t>

              <t hangText="redirect_uri">A redirection URI where the response
              will be sent. This MUST be pre-registered with the provider.</t>
           </list>
	  </t>

          <t>The request MAY contain the following OPTIONAL and sometimes REQUIRED parameters:</t>

          <t>
	    <list style="hanging">
            
              <t hangText="nonce">A string value used to associate a Client session 
              with an ID Token, and to mitigate replay attacks. 
              The value is passed through unmodified to the ID Token.
              One method to achieve this is to store a random value as a signed session cookie, and
              pass the value in the <spanx style="verb">nonce</spanx> parameter.
	      In that case, the <spanx style="verb">nonce</spanx> in the returned ID Token
              is compared to the signed session cookie to detect ID Token replay by third 
              parties.</t>
 
              <t hangText="state">RECOMMENDED.  An opaque value used
              to maintain state between the request and the callback;
              serves as a protection against XSRF attacks.</t>

              <t hangText="display">An ASCII string value that specifies
              how the Authorization Server displays the authentication and
              consent user interface pages to the End-User. The following values
              are supported:

	      <list style="hanging">
              <t hangText="page">The Authorization Server SHOULD display
              authentication and consent UI consistent with a full user-agent page
              view. If the display parameter is not specified this is the
              default display mode.</t>

              <t hangText="popup">The Authorization Server SHOULD display
              authentication and consent UI consistent with a popup user-agent
              window. The popup user-agent window SHOULD be 450 pixels wide
              and 500 pixels tall.</t>

              <t hangText="touch">The Authorization Server SHOULD display
              authentication and consent UI consistent with a device that
              leverages a touch interface. The Authorization Server MAY attempt
              to detect the touch device and further customize the interface.</t>

              <t hangText="wap">The Authorization Server SHOULD display
              authentication and consent UI consistent with a "feature phone"
              type display.</t>
	    </list>
	  </t>

	  <t hangText="prompt">A space delimited, case sensitive list of
	  ASCII string values that specifies whether the Authorization Server prompts
	  the End-User for reauthentication and consent. The possible values
	  are:

	  <list style="hanging">
	    <t hangText="none">This value informs the Authorization Server
	    that it MUST NOT display any authentication or consent
	    user interface pages. An error is returned if the End-User 
	    is not already authenticated or the Client does not have 
	    pre-configured consent for the requested
	    <spanx style="verb">scopes</spanx>. This can be used as a
	    method to check for existing authentication and/or consent.</t>

	    <t hangText="login">The Authorization Server MUST prompt the
	    End-User for reauthentication.</t>

	    <t hangText="consent">The Authorization Server MUST prompt
	    the End-User for consent before returning information to the
	    Client.</t>

	    <t hangText="select_account">The Authorization Server MUST
	    prompt the End-User to select a user account.  This allows 
	    a user who has multiple accounts at the Authorization Server
	    to select amongst the multiple accounts that they may have 
	    current sessions for.</t>
	  </list>

	  The <spanx style="verb">prompt</spanx> parameter
	  can be used by the Client to make sure that the End-User is
	  still present for the current session or to bring attention to the
	  request. If this parameter contains <spanx style="verb">none</spanx>
	  with any other value, an
	  error is returned.
	  </t>
	  </list>
	  </t>

          <figure>
            <preamble>The following is a non-normative example of an
            Authorization Request URL
	    (with line wraps for display purposes only):</preamble>

            <artwork><![CDATA[https://server.example.com/authorize?
response_type=token%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&scope=openid%20profile
&state=af0ifjsldkj
&nonce=n-0S6_WzA2Mj]]></artwork>
          </figure>
        </section>

        <section anchor="implicit_req"
		 title="Client sends a request to the Authorization Server">
          <t>Having constructed the Authorization Request, the Client sends it
          to the Authorization Endpoint. This MAY happen via HTTPS redirect, 
          hyperlinking, or any other secure means of directing the User-Agent 
          to the URL.</t>

          <figure>
	    <preamble>Following is a non-normative example using HTTP redirect
	    (with line wraps for display purposes only):</preamble>

            <artwork><![CDATA[HTTP/1.1 302 Found
Location: https://server.example.com/authorize?
response_type=token%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&scope=openid%20profile
&state=af0ifjsldkj
&nonce=n-0S6_WzA2Mj]]></artwork>
          </figure>
        </section>

        <section title="Authorization Server Authenticates the End-User">

          <t>The authorization server authenticates the resource owner
          to make sure that the consent is obtained from the right
          party. The exact method of how the authentication is
          performed is out of scope of this specification. </t>
        </section>

        <section title="Authorization Server Obtains the End-User Consent/Authorization">

          <t>The Authorization Server obtains an authorization decision,
          for the requested scopes. This can 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).</t>

          <t>The <spanx style="verb">openid</spanx> scope grants the RP access
          to the user identifier of the authenticated End-User of the session.</t>

          <t>All other scopes are optional. It is up to the OpenID Provider
          to determine if an error should be returned in the case of the End-User 
          declining to authorize scopes other than 
          <spanx style="verb">openid</spanx>.</t>
        </section>

        <section anchor="implicit_res"
                 title="Authorization Server Sends the End-User Back to the Client">

          <t>Once the authorization is determined, the Authorization Server
          returns a successful response or an error response.</t>

          <section anchor="implicit_ok" title="End-User Grants Authorization">

            <t>If the Resource Owner grants the access request, the
            Authorization Server issues an Access Token and delivers it to the
            Client by adding the following parameters to the fragment
            component of the redirection URI using the 
            <spanx style="verb">application/x-www-form-urlencoded</spanx>
            format as defined in Section 4.2.2 of
            <xref target="OAuth2.0">OAuth 2.0</xref> and 
            <xref target="OAuth.Responses">OAuth 2.0 Multiple Response Type
            Encoding Practices</xref>.</t>

            <t>In the Implicit Flow, the entire response is returned in the
            fragment component of the redirect URL, as defined in 4.2.2 of
            <xref target="OAuth2.0">OAuth 2.0</xref></t>

            <t>
	      <list style="hanging">
                <t hangText="access_token">REQUIRED. The Access Token for the
                UserInfo Endpoint.</t>

                <t hangText="token_type">REQUIRED. The value MUST be
                "bearer"</t>

                <t hangText="id_token">REQUIRED. The ID Token.</t>

                <t hangText="state">REQUIRED if the 
                <spanx style="verb">state</spanx> parameter is present in the
                client Authorization Request. Clients MUST verify that the 
                <spanx style="verb">state</spanx> value is equal to the exact 
                value of <spanx style="verb">state</spanx> parameter in the 
                Authorization Request.</t>

                <t hangText="expires_in">OPTIONAL. The expiration time in
                seconds of the Access Token.</t>
              </list>
	    </t>

            <t>The Client can then use the Access Token to access protected
            resources at Resource Servers.</t>

            <figure>
              <preamble>The following is a non-normative example
	      (with line wraps after the second line for the display purposes only):</preamble>

              <artwork><![CDATA[HTTP/1.1 302 Found
Location: https://client.example.org/cb#
access_token=SlAV32hkKG
&token_type=bearer
&id_token=eyJ0 ... NiJ9.eyJ1c ... I6IjIifX0.DeWt4Qu ... ZXso
&expires_in=3600
&state=af0ifjsldkj]]></artwork>
            </figure>
          </section>

          <section anchor="implicit_authz_error"
                   title="End-User Denies Authorization or Invalid Request">

            <t>If the End-User denies the authorization or the End-User authentication
            fails, the Authorization Server MUST return the error
            authorization response as defined in 4.2.2.1 of 
            <xref target="OAuth2.0">OAuth 2.0</xref>. No other parameters 
            SHOULD be returned.</t>
          </section>
          
          <section anchor="implicit_callback" 
                   title="Example Redirect URI response">
          <t>The client must provide a way for the user agent to parse the fragment encoded
          response and POST it to the web server client for validation.</t>
          <t>The following is an example of a JavaScript file that a Client might host at its
          <spanx style="verb">redirect_uri</spanx>.  This is loaded by the redirect from
          the Authorization Server.  The fragment is parsed and then sent by POST to a URI 
          that will validate the information received.</t>

          <figure>
	    <preamble>Following is a non-normative example of a
	    Redirect URI response:</preamble>
	    <artwork><![CDATA[GET /cb HTTP/1.1
Host: client.example.org
          
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8

<script type="text/javascript">

// First, parse the query string
var params = {}, postBody = location.hash.substring(1),
    regex = /([^&=]+)=([^&]*)/g, m;
while (m = regex.exec(postBody)) {
  params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
}

// And send the token over to the server
var req = new XMLHttpRequest();
// using POST so query isn't logged
req.open('POST', 'https://' + window.location.host +
                 '/catch_response', true);
req.setRequestHeader('Content-Type',
                     'application/x-www-form-urlencoded');

req.onreadystatechange = function (e) {
  if (req.readyState == 4) {
    if (req.status == 200) {
// If the response from the POST is 200 OK, redirect the user
      window.location = 'https://'
        + window.location.host + '/redirect_after_login'
    }
// if the OAuth response is invalid, generate an error message
    else if (req.status == 400) {
      alert('There was an error processing the token')
    } else {
      alert('Something other than 200 was returned')
    }
  }
};
req.send(postBody);]]></artwork>
	  </figure>
         
	  </section>
        </section>
        
      </section>

      <section anchor="id_token" title="ID Token">
          <t>The ID Token is a security token that contains Claims about the
          authentication event and other requested Claims.  
          The ID Token is represented as a <xref target="JWT">JSON Web Token (JWT)</xref>.</t>

          <t>The ID Token is used to manage the authentication event and user
          identifier and is scoped to a particular Client via the <spanx
          style="verb">aud</spanx> (audience) and <spanx style="verb">nonce</spanx>
          Claims. </t>

          <t>The following Claims are REQUIRED within the ID Token:</t>

          <t><list style="hanging">
              <t hangText="iss">REQUIRED. The Issuer Identifier for the Issuer
              of the response.</t>

              <t hangText="user_id">REQUIRED. A locally unique and never
              reassigned identifier within the Issuer for the End-User, 
              which is intended to be
              consumed by the Client. e.g. <spanx style="verb">24400320</spanx>
              or <spanx style="verb">AItOawmwtWwcT0k51BayewNvutrJUqsvl6qs7A4</spanx>.
              It MUST NOT exceed 255 ASCII characters in length.</t>

              <t hangText="aud">REQUIRED. This member identifies the audience
              that this ID Token is intended for. It MUST be the OAuth 2.0 <spanx style="verb">client_id</spanx>
              of the Client.</t>

              <t hangText="exp">REQUIRED. Type Integer. Identifies the
              expiration time on or after which the ID Token MUST NOT be
              accepted for processing. The processing of this parameter
              requires that the current date/time MUST be before the
              expiration date/time listed in the value. Implementers MAY
              provide for some small leeway, usually no more than a few
              minutes, to account for clock skew. The value is number of
              seconds from 1970-01-01T0:0:0Z as measured in UTC until the
              desired date/time. See <xref target="RFC3339">RFC 3339</xref>
              for details regarding date/times in general and UTC in
              particular.</t>
              
              <t hangText="iat">REQUIRED. Type Integer. The <spanx style="verb">iat</spanx> 
              (issued at) Claim identifies the time at which the JWT was issued. 
              The value is number of
              seconds from 1970-01-01T0:0:0Z as measured in UTC until the
              desired date/time. See <xref target="RFC3339">RFC 3339</xref>
              for details regarding date/times in general and UTC in
              particular.</t>

	      <t hangText="nonce">A string value used to associate a Client session 
              with an ID Token, and to mitigate replay attacks. 
              The value is passed through unmodified from the Authorization Request to the ID Token.
	      If present in the <xref target="id_token">ID Token</xref>,
	      clients MUST verify that
              the <spanx style="verb">nonce</spanx> Claim value is equal to
              the value of the <spanx style="verb">nonce</spanx>
              parameter sent in the Authorization Request.
	      If present in the Authorization Request, Authorization Servers
	      MUST include a <spanx style="verb">nonce</spanx> Claim in the
	      <xref target="id_token">ID Token</xref> with the Claim value
	      being the nonce value sent in the Authorization Request.
	      Use of the nonce is REQUIRED when using the implicit flow
	      and OPTIONAL when using the code flow.</t>
	      
	      <t hangText="at_hash">
              If the ID Token is issued with an <spanx style="verb">access_token</spanx>
	      in an implicit flow, this is REQUIRED.
              The value is produced by base64url encoding the left-most half of the hash 
              created by hashing the <spanx style="verb">access_token</spanx> 
              with the SHA-2 family hash algorithm
              of the same length as the hash used in the <spanx style="verb">alg</spanx>
              parameter of the <xref target="JWS">JWS</xref> header.
	      For instance, if the <spanx style="verb">alg</spanx> is
              <spanx style="verb">HS256</spanx>, hash <spanx style="verb">access_token</spanx>
	      with SHA-256, then take the left-most 128 bits and base64url encode them.</t>

            </list></t>
            <t>Additional optional claims may be present in the ID Token.</t>

	    <t>ID Tokens MUST be signed using <xref
	    target="JWS">JWS</xref> and OPTIONALLY both signed and
	    encrypted using <xref target="JWS">JWS</xref> and <xref
	    target="JWE">JWE</xref> respectively, thereby providing
	    authentication, integrity,
	    non-repudiation, and optionally, confidentiality.</t>

	    <t>
	      Clients MUST directly validate the ID Token per 
	      <xref target="id.token.verification">ID Token Verification</xref>. 
	    </t>

        </section>
        
      <section anchor="id.token.verification" title="ID Token Verification">
        
        <t>To verify the validity of ID Token in the Authorization Response,
	the Client MUST do the following:</t>

        <t>
          <list style="numbers">

            <t>The Client MUST validate that the <spanx style="verb">client_id</spanx> in the 
            <spanx style="verb">aud</spanx> (audience) Claim is one
	    it has registered for the Issuer identified by the value in the 
	    <spanx style="verb">iss</spanx> (issuer) Claim.
	    The ID Token MUST be rejected if the value of 
	    <spanx style="verb">aud</spanx> (audience) is not valid for the 
	    Issuer.</t>
             
            <t>The Client MUST verify the signature of the ID Token according to
            <xref target="JWS">JWS</xref> using the algorithm specified in the 
            <spanx style="verb">alg</spanx> parameter of the JWT header.</t>
            
            <t>The <spanx style="verb">alg</spanx> value SHOULD be <spanx style="verb">RS256</spanx>.
            Validation of tokens using other signing algorithms is described in the
            <xref target="OpenID.Messages">OpenID Connect Messages</xref>
	    specification.</t>
            
            <t>The Client MUST use the signing key provided
	    in Discovery by the Issuer.
	    The Issuer must exactly match the value of the 
            <spanx style="verb">iss</spanx> (issuer) Claim.</t>

            <t>The current time MUST be less than the value of the 
            <spanx style="verb">exp</spanx> Claim.</t>
            
            <t>The <spanx style="verb">iat</spanx> Claim may be used to reject tokens that
            were issued too far away from the current time, limiting the amount of
            time that nonces must be stored to prevent attacks. 
            The acceptable range is Client specific.</t>
            
            <t>The value of the <spanx style="verb">nonce</spanx>
	    Claim MUST be checked to verify that
            it is the same value as the one that was sent in the Authorization
            Request. The Client SHOULD check the <spanx style="verb">nonce</spanx> value for replay attacks.
            The precise method for detecting replay attacks is Client specific.</t>
            
            <t>If the <spanx style="verb">acr</spanx> Claim was requested, the 
            Client SHOULD check that the asserted Claim Value is appropriate.
            The meaning and processing of  
            <spanx style="verb">acr</spanx> Claim Values is out of scope for this specification.</t>
            
            <t>If the <spanx style="verb">auth_time</spanx> Claim was requested, the 
            Client SHOULD check the value 
            and request re-authentication if it determines too much time has elapsed 
            since the last user authentication.</t>
            
          </list>
	</t>
      </section>

      <section anchor="userinfo" title="UserInfo Endpoint">

	<t>To obtain the additional attributes and tokens, the Client makes a
	GET or POST request to the UserInfo Endpoint.</t>

	<t>UserInfo Endpoint Servers MUST require the use of a transport-layer
	security mechanism. The UserInfo Endpoint Server MUST support TLS 1.2
	<xref target="RFC5246">RFC 5246</xref> and/or TLS 1.0
	<xref target="RFC2246"/> and MAY support
	other transport-layer mechanisms with equivalent security.</t>

	<t>NOTE: The UserInfo Endpoint response is not guaranteed to be about the
	Interactive user identified by the <spanx style="verb">user_id</spanx> element of the ID Token. 
	The <spanx style="verb">user_id</spanx> Claim in the UserInfo Endpoint response MUST exactly match the 
	<spanx style="verb">user_id</spanx> Claim in the ID Token, before using additional UserInfo Endpoint Claims.</t>

	<section title="UserInfo Request">

	  <t>Clients MAY send requests with the following parameters to the
	  UserInfo Endpoint to obtain further information about the End-User. The
	  UserInfo Endpoint is an <xref target="OAuth2.0">OAuth 2.0</xref>
	  Protected Resource that complies with the <xref
	  target="OAuth.Bearer">OAuth 2.0 Bearer Tokens</xref> specification. As such,
	  the Access Token SHOULD be specified via the HTTP Authorization
	  header.</t>

	  <t>
	    <list style="hanging">
	      <t hangText="access_token">REQUIRED. The Access Token obtained
	      from an OpenID Connect Authorization Request. This parameter MUST
	      only be sent using one method through either the HTTP Authorization
	      header or a form-encoded HTTP POST body parameter.</t>

	      <t hangText="schema">REQUIRED. The schema in which the
	      data is to be returned. The only defined value is <spanx
	      style="verb">openid</spanx>.</t>

	      <t hangText="id">This identifier is reserved. It MUST be
	      ignored by the endpoint when the <spanx
	      style="verb">openid</spanx> schema is used.</t>
	    </list>
	  </t>

	  <figure>
	    <preamble>The following is a non-normative example:</preamble>

	    <artwork><![CDATA[GET /userinfo?schema=openid HTTP/1.1
Host: server.example.com
Authorization: Bearer SlAV32hkKG]]></artwork>
	  </figure>
	</section>

	<section anchor="id_res" title="UserInfo Response">
	  <t>If the requested schema is <spanx style="verb">openid</spanx>,
	  the response MUST return a
	  JSON object that contains the full set or subset of Claims that are
	  defined below. Additional Claims (not specified below) MAY also be
	  returned.</t>

          <t>
            If a Claim is not returned, that Claim Name SHOULD be
            omitted from the JSON object representing the Claims; it
            SHOULD NOT be present with a null or empty string value.
          </t>

	  <t>The members MAY be represented in multiple languages and scripts.
	  To specify the languages and scripts, <xref
	  target="RFC5646">BCP47</xref> language tags MUST be added to each
	  member names delimited by a <spanx style="verb">#</spanx>, e.g.,
	  <spanx style="verb">family_name#ja-Kana-JP</spanx> for expressing
	  Family Name in Katakana in Japanese, which is commonly used to index
	  and represent the phonetics of the Kanji representation of the same
	  represented as <spanx style="verb">family_name#ja-Hani-JP</spanx>.</t>

	  <texttable anchor="ClaimTable" title="Reserved Member Definitions">

	    <ttcol align="left">Member</ttcol>
	    <ttcol align="left">Type</ttcol>
	    <ttcol align="left">Description</ttcol>

	    <c>user_id</c>
	    <c>string</c>
	    <c>REQUIRED Identifier for the End-User at the Issuer.</c>

	    <c>name</c>
	    <c>string</c>
	    <c>End-User's full name in displayable form including all name parts,
	    ordered according to End-User's locale and preferences.</c>

	    <c>given_name</c>
	    <c>string</c>
	    <c>Given name or first name of the End-User.</c>

	    <c>family_name</c>
	    <c>string</c>
	    <c>Surname or last name of the End-User.</c>

	    <c>middle_name</c>
	    <c>string</c>
	    <c>Middle name of the End-User.</c>

	    <c>nickname</c>
	    <c>string</c>
	    <c>Casual name of the End-User that may or may not be the same as the
	    <spanx style="verb">given_name</spanx>. For instance, a <spanx
	    style="verb">nickname</spanx> value of <spanx style="verb">Mike</spanx>
	    might be returned alongside a <spanx style="verb">given_name</spanx>
	    value of <spanx style="verb">Michael</spanx>.</c>

	    <c>preferred_username</c>
            <c>string</c>
            <c>Shorthand name that the End-User wishes to be referred to at the RP, such as
            <spanx style="verb">janedoe</spanx> or <spanx style="verb">j.doe</spanx>. 
            This value MAY be any valid JSON string including 
            special characters such as <spanx style="verb">@</spanx>, 
            <spanx style="verb">/</spanx>, or whitespace. This value MUST NOT
            be relied upon to be unique by the RP. 
            (See <xref target="claim.stability"></xref>.)</c>
            
	    <c>profile</c>
	    <c>string</c>
	    <c>URL of the End-User's profile page.</c>

	    <c>picture</c>
	    <c>string</c>
	    <c>URL of the End-User's profile picture.</c>

	    <c>website</c>
	    <c>string</c>
	    <c>URL of the End-User's web page or blog.</c>

	    <c>email</c>
	    <c>string</c>
	    <c>The End-User's preferred e-mail address. 
            This value MUST NOT be relied upon to be unique by 
            the RP. (See <xref target="claim.stability"></xref>.)</c>

	    <c>email_verified</c>
	    <c>boolean</c>
	    <c>True if the End-User's e-mail address has been verified; otherwise
	    false.</c>

	    <c>gender</c>
	    <c>string</c>
	    <c>The End-User's gender: Values defined by this
	    specification are <spanx style="verb">female</spanx> and
	    <spanx style="verb">male</spanx>.  Other values MAY be used
	    when neither of the defined values are applicable.</c>

	    <c>birthday</c>
	    <c>string</c>
	    <c>The End-User's birthday, represented as a date string in MM/DD/YYYY
	    format. The year MAY be <spanx style="verb">0000</spanx>, indicating
	    that it is omitted.</c>

	    <c>zoneinfo</c>
	    <c>string</c>
	    <c>String from zoneinfo <xref target="zoneinfo"/> time zone
	    database. For example, <spanx style="verb">Europe/Paris</spanx> or
	    <spanx style="verb">America/Los_Angeles</spanx>.</c>

	    <c>locale</c>
	    <c>string</c>
	    <c>The End-User's locale, represented as a
	    <xref target="RFC5646">BCP47</xref> language tag.
	    This is typically an <xref
	    target="ISO639-1">ISO 639-1 Alpha-2</xref> language code in
	    lowercase and an <xref target="ISO3166-1">ISO 3166-1 Alpha-2</xref>
	    country code in uppercase, separated by a dash. For example, <spanx
	    style="verb">en-US</spanx> or <spanx style="verb">fr-CA</spanx>. As
	    a compatibility note, some implementations have used an underscore
	    as the separator rather than a dash, for example, <spanx
	    style="verb">en_US</spanx>; Implementations MAY choose to accept
	    this locale syntax as well.</c>

	    <c>phone_number</c>
	    <c>string</c>
	    <c>The End-User's preferred telephone number. <xref target="E.164">
	    E.164</xref> is RECOMMENDED as the format of this Claim. 
	    For example, <spanx style="verb">+1 (425) 555-1212</spanx>
	    or <spanx style="verb">+56 (2) 687 2400</spanx>.</c>

	    <c>address</c>
	    <c>JSON object</c>
	    <c>The End-User's preferred address. The value of the <spanx
	    style="verb">address</spanx> member is a <xref
	    target="RFC4627">JSON</xref> structure containing some or all of
	    the members defined in <xref target="address_claim" />.</c>

	    <c>updated_time</c>
	    <c>string</c>
	    <c>Time the End-User's information was last updated, represented as a
	    <xref target="RFC3339">RFC 3339</xref> datetime. For example, <spanx
	    style="verb">2011-01-03T23:58:42+0000</spanx>.</c>
	  </texttable>

	  <figure>
	    <preamble>Following is a non-normative example of such
	    a response:</preamble>

	    <artwork><![CDATA[{
 "user_id": "248289761001",
 "name": "Jane Doe",
 "given_name": "Jane",
 "family_name": "Doe",
 "preferred_username": "j.doe",
 "email": "janedoe@example.com",
 "picture": "http://example.com/janedoe/me.jpg"
}]]></artwork>
	  </figure>

	  <t>The UserInfo Endpoint MUST return Claims in JSON format unless a
	  different format was specified during <xref target="OpenID.Registration">
	  OpenID Connect Dynamic Client Registration 1.0</xref>.
	  The UserInfo Endpoint MUST return a content-type header to indicate
	  which format is being returned. The following are accepted content
	  types:</t>

	  <texttable style="all">
	    <ttcol>Content-Type</ttcol>
	    <ttcol>Format Returned</ttcol>

	    <c>application/json</c>
	    <c>plain text JSON object</c>

	    <c>application/jwt</c>
	    <c>JSON Web Token (JWT)</c>
	  </texttable>

	  <section title="Address Claim" anchor="address_claim">
	    <t>
	      The components of a physical mailing address. 
	      Implementations MAY return only a subset of the
	      fields of an <spanx style="verb">address</spanx>, depending upon
	      the information available and the End-User's privacy 
	      preferences. For
	      example, the <spanx style="verb">country</spanx> and <spanx 
	      style="verb">region</spanx> might be returned without returning
	      more fine-grained address information.
	    </t>
	    <t>
	      Implementations MAY return just the full address 
	      as a single string in the formatted sub-field, 
	      or they MAY return just the individual component 
	      fields using the other sub-fields, 
	      or they MAY return both. 
	      If both variants are returned, 
	      they SHOULD be describing the same address, 
	      with the formatted address indicating how the 
	      component fields SHOULD be combined.
	    </t>
	    <t>
	      <list style="hanging">
		<t hangText="formatted">The full mailing address, 
		formatted for display or use with a mailing label. 
		This field MAY contain newlines. This is the 
		Primary Sub-Field for this field, 
		for the purposes of sorting and filtering.</t>

		<t hangText="street_address">
		The full street address component, 
		which may include house number, street name, 
		PO BOX, and multi-line extended street 
		address information. This field MAY contain newlines.</t>

		<t hangText="locality">The city or locality component.</t>

		<t hangText="region">The state, province, 
		prefecture or region component.</t>

		<t hangText="postal_code">The zip code or 
		postal code component.</t>

		<t hangText="country">The country name component.</t>
	      </list>
	    </t>
	  </section>

	  <section anchor="claim.stability" title="Claim Stability and Uniqueness">
          
	    <t>The <spanx style="verb">user_id</spanx> claim is the only claim that a client
	    can rely upon to be stable, since the <spanx style="verb">user_id</spanx>
	    claim MUST be locally unique and never reassigned within the Issuer
	    for a particular End-User, as described in <xref target="id_token"></xref>.</t>
          
	    <t>Therefore, the only guaranteed unique identifier for a given End-User is a 
	    combination of the Issuer's identifier and the <spanx style="verb">user_id</spanx>
	    claim; other fields such as <spanx style="verb">preferred_username</spanx>
	    and <spanx style="verb">email</spanx> MUST NOT be used as unique identifiers 
	    for a given End-User.</t>
           
	    <t>All other claims carry no such guarantees across different issuers in terms of
	    stability over time or uniqueness across users, and Issuers are permitted to
	    apply local restrictions and policies. For instance, an Issuer MAY re-use a 
	    given <spanx style="verb">preferred_username</spanx> or 
	    <spanx style="verb">email</spanx> address claim across different
            End-Users at different points in time, and the claimed 
            <spanx style="verb">preferred_username</spanx> or 
            <spanx style="verb">email</spanx> address for a given End-User MAY change 
            over time.</t>
            
          </section>
	</section>

	<section title="UserInfo Error Response">

	  <t>When an error condition occurs, the UserInfo Endpoint returns
	  an Error Response as defined in Section 3 of
	  <xref target="OAuth.Bearer">OAuth 2.0 Bearer Tokens</xref>.</t>

	  <t>In addition to the error codes defined in Section 3.1 of <xref
	  target="OAuth.Bearer">OAuth 2.0 Bearer Tokens</xref>, this specification defines the
	  following error codes:</t>

	  <t>
	    <list style="hanging">
	      <t hangText="invalid_schema">The requested schema is invalid or
	      unsupported.</t>
	    </list>
	  </t>
	</section>
      </section>
    </section>

    <section anchor="self_issued" title="Self Issued Identity Provider">
      <t>There is a special issuer "https://self-issued.me" that indicates a user is using a personal IdP that is issuing self signed id_token. </t>
      <section anchor="self_issued.discovery" title="Self Issued Identity Provider Discovery">
        <t>
          If the input identifier contains the domain self-issued.me, dynamic discovery is not performed. 
          The following static configuration values are used.
        </t>
        <t>
          <figure>
            <artwork><![CDATA[{
 "authorization_endpoint":
   "openid:",
 "issuer":
   "https://self-issued.me",
 "scopes_supported":
   ["openid", "profile", "email", "address", "phone"],
 "response_types_supported":
   ["id_token"],
 "user_id_types_supported":
   ["pairwise"],
 "id_token_algs_supported":
   ["RS256"],
 "request_object_algs_supported":
   ["RS256"]
 }]]>
            </artwork>
          </figure>
        </t>
        <t>Note: OpenID Foundation may consider hosting a domain https://self-issued.me/ 
          which returns the above static configuration file so that the client would not 
          need any special treatment of the self issued IdP. 
        </t>
      </section>
      <section anchor="self_issued.registration" title="Client Registration to Self Issued Identity Provider">
        <t>
          When dealing with the Self Issued IdP, the Client is deemed to have 
          registered with the IdP and obtained following Client Registration Response.  
        </t>
        <list style="hanging">
          <t hangText="client_id">
            The <spanx style="verb">redirect_uri</spanx> of the Client. 
          </t>
          <t hangText="expires_at">
            0.
          </t>
        </list>
        <t>Note: OpenID Foundation may consider hositng an endpoint 
          <spanx style="verb">https://self-issued.me/registration/1.0/</spanx> 
          that returns the static response as above so that the Client may not need to 
          perform any special processing for a Self Issued IdP. 
        </t>
      </section>

      <section anchor="self_issued.request" title="Self Issued Identity Provider Request">
        <t>The Client sends the Authorization Request to the Authorization
           Endpoint with the following REQUIRED parameters. </t>
        <list style="hanging">
          <t hangText="response_type">
            REQUIRED. <spanx style="verb">id_token</spanx>.
          </t>
          <t hangText="client_id">
            REQUIRED. <spanx style="verb">redirect_uri</spanx> 
            of the client. Note that since it is same as the 
            <spanx style="verb">redirect_uri</spanx>, <spanx style="verb">redirect_uri</spanx> 
            is not required to be sent in the request. 
          </t>
          <t hangText="scope">
            REQUIRED. Supported <spanx style="verb">scope</spanx> 
            desicribed in the previous section. It MUST include 
            <spanx style="verb">openid</spanx>. 
          </t>
        </list>
        <t>
          Other parameters MAY be sent. 
          Note that the user clames are returned in the <spanx style="verb">id_token</spanx>.  
        </t>
        <t>The entire URL MUST NOT exceed 2048 bytes.</t>
        <figure>
          <preamble>
            Following is a non-normative example (with line wraps for display purposes only):
          </preamble>
          <artwork><![CDATA[HTTP/1.1 302 Found
Location: openid://
?response_type=id_token
&client_id=https%3A%2F%2Fclient.example.org%2cb
&scope=openid%20profile
&state=af0ifjsldkj&nonce=n-0S6_WzA2Mj]]></artwork>
        </figure> 
      </section>
      <section anchor="self_issued.response" title="Self Issued Identity Provider Response">
        <t>Self Issued Identity Provider Response will be the same as the normal implicit flow 
          response apart from the fact that the <spanx style="verb">iss</spanx> claim is 
          <spanx style="verb">https://self-issued.me</spanx> and user cliams are 
          returned in <spanx style="verb">id_token</spanx>. Since it is an implicit flow 
          reponse, the response parameters will be returned in fragment. 
        </t>
      </section>
      <section anchor="self_issued.verification" title="Self Issued Identity ID Token Verification">
        <t>To verify the validity of ID Token in the Authorization or Token Endpoint Response, the Client
        MUST do the following:</t>

        <t><list style="numbers">
          <t>
            The Client MUST validate that the value of the <spanx style="verb">iss</spanx> (issuer) Claim is <spanx style="verb">https://self-isued.me</spanx>.  
            If <spanx style="verb">iss</spanx> contains a diffrent value, 
            it MUST be validated according to 
            <xref target="id.token.verification">ID Token Verification</xref>.
          </t>
          <t>
            The Client MUST validate that the value of the 
            <spanx style="verb">aud</spanx> (audience) Claim is the value of the <spanx style="verb">redirect_uri</spanx>
             that the client sent in the authentication request. 
           </t>
           <t>
            The Client MUST verify the signature of the ID Token according to
            <xref target="JWS">JWS</xref> using the algorithm specified in the 
            <spanx style="verb">alg</spanx> parameter of the JWT header,  
            using the key in the user_jwk claim.  The key is in JWK format.
          </t>
          <t>
            The <spanx style="verb">alg</spanx> value SHOULD be the default of 
            <spanx style="verb">RS256</spanx>. It may also be <spanx style="verb">ES256</spanx>.
          </t>
          <t>
            The Client MUST validate that the <spanx style="verb">user_id</spanx> value is a 
            base64url encoded binary SHA256 hash of 
            the concatination of the value of <spanx style="verb">mod</spanx> and 
            <spanx style="verb">exp</spanx> of the <spanx style="verb">user_jwk</spanx>.
          </t>
          <t>
            The current time MUST be less than the value of the 
            <spanx style="verb">exp</spanx> Claim.
          </t>
          <t>
            The <spanx style="verb">iat</spanx> Claim may be used to reject tokens that 
            were issued too far away from the current time, limiting the amount of
            time that nonces must be stored to prevent attacks. 
            The acceptable range is Client specific.
          </t>
          <t>
            If a nonce value was sent in the Authorization Request, 
            a <spanx style="verb">nonce</spanx> Claim MUST be present 
            and its value of the checked to verify that
            it is the same value as the one that was sent in the Authorization
            Request. The Client SHOULD check the <spanx style="verb">nonce</spanx> value for replay attacks.
            The precise method for detecting replay attacks is Client specific.
          </t>
        </list></t>
        <figure>
            <preamble>The following is a non-normative example of a base64url decoded 
            self issued <spanx style="verb">id_token</spanx>. Note that the 
            line wraps are for display purpose only:</preamble>

            <artwork><![CDATA[
{
 "iss": "https://self-issued.me",
 "user_id": "wBy8QvHbPzUnL0x63h13QqvUYcOur1X0cbQpPVRqX5k",
 "aud": "https://client.example.org/cb",
 "nonce": "n-0S6_WzA2Mj",
 "exp": 1311281970,
 "iat": 1311280970,
 "user_jwk": {"alg":"RSA",
        "mod": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx
   4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs
   tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2
   QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI
   SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb
   w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw",
        "exp":"AQAB" 
        }
}]]></artwork>
        </figure>

      </section>
    </section>
      
    <section anchor="disco_reg" title="Discovery and Registration">

      <t>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.</t>

      <t>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 <xref
      target="OpenID.Discovery">OpenID Connect Discovery 1.0</xref> and <xref
      target="OpenID.Registration">OpenID Connect Dynamic Client Registration
      1.0</xref> specifications.</t>
    </section>

    <section anchor="qss" title="Query String Serialization">
      <t>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 using the <spanx
      style="verb">application/x-www-form-urlencoded</spanx> format as
      defined by <xref target="W3C.REC-html401-19991224"/>.</t>

      <figure>
        <preamble>Following is a non-normative example of such
        serialization:</preamble>

        <artwork><![CDATA[GET /authorize?scope=openid&response_type=code
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb HTTP/1.1
Host: server.example.com]]></artwork>
      </figure>
    </section>

    <section anchor="form_serialization" title="Form Serialization">

      <t>Parameters and their values are form serialized by adding the 
      parameter names and values to the entity body of the HTTP request using
      the <spanx style="verb">application/x-www-form-urlencoded</spanx> format
      as defined by <xref target="W3C.REC-html401-19991224"/>. Form
      serialization is typically used in HTTP POST requests.</t>

      <figure>
	<preamble>Following is a non-normative example of such
	serialization:</preamble>

	<artwork><![CDATA[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.org%2Fcb]]></artwork>
      </figure>
    </section>

    <section anchor="stringops" title="String Operations">
      <t>
	Processing some OpenID Connect messages requires comparing
	values in the messages to known values. For example, the Claim
	Names returned by the UserInfo Endpoint might be compared to
	specific Claim Names such as <spanx
	style="verb">user_id</spanx>.  Comparing Unicode strings,
	however, has significant security implications.
      </t>
      <t>
	Therefore, comparisons between JSON strings and other Unicode
	strings MUST be performed as specified below:

	<list style="numbers">
          <t>
	    Remove any JSON applied escaping to produce an array of
	    Unicode code points.
	  </t>
          <t>
	    <xref target="USA15">Unicode Normalization</xref> MUST NOT
	    be applied at any point to either the JSON string or to
	    the string it is to be compared against.
	  </t>
          <t>
	    Comparisons between the two strings MUST be performed as a
	    Unicode code point to code point equality comparison.
	  </t>
        </list>
      </t>
      <t>
	In several places, this specification uses space delimited
	lists of strings.  In all such cases, only the ASCII space
	character (0x20) MAY be used for this purpose.
      </t>

    </section>

    <section anchor="security_considerations" title="Security Considerations">

      <t>For security considerations, refer to the
      <xref target="OpenID.Standard">OpenID Connect Standard 1.0 Specification</xref>.
      </t>
    </section>

    <section anchor="privacy_considerations" title="Privacy Considerations">

      <t>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 <spanx
      style="verb">redirect_uri</spanx>.</t>

      <t>Only necessary UserInfo data SHOULD be stored at the Client and the
      Client SHOULD associate the received data with the purpose of use
      statement.</t>

      <t>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.</t>

      <t>To protect the End-User from a possible correlation among Clients, the
      use of a Pairwise Pseudonymous Identifier (PPID) as the <spanx
      style="verb">user_id</spanx> SHOULD be considered.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document makes no requests of IANA.</t>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2246"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3339"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5646"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246"?>

      <?rfc include='http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-html401-19991224.xml' ?>

      <reference anchor="USA15">
        <front>
          <title>Unicode Normalization Forms</title>

          <author fullname="Mark Davis" initials="M." surname="Davis">
            <address>
              <email>markdavis@google.com</email>
            </address>
          </author>

          <author fullname="Ken Whistler" initials="K." surname="Whistler">
            <address>
	      <email>ken@unicode.org</email>
	    </address>
          </author>

          <author fullname="Martin D&uuml;rst" initials="M." surname="D&uuml;rst">
	  </author>

          <date day="03" month="09" year="2009" />
        </front>

        <seriesInfo name="Unicode Standard Annex" value="15" />
      </reference>

      <reference anchor="OAuth2.0">
        <front>
          <title>The OAuth 2.0 Authorization Framework</title>

          <author fullname="Eran Hammer" initials="E." role="editor" surname="Hammer">
            <organization></organization>
          </author>

          <author fullname="David Recordon" initials="D." surname="Recordon">
            <organization abbrev="Facebook">Facebook</organization>
          </author>

          <author fullname="Dick Hardt" initials="D." surname="Hardt">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <date day="19" month="June" year="2012" />
        </front>

        <format target="http://tools.ietf.org/html/draft-ietf-oauth-v2"
                type="HTML" />
      </reference>

      <reference anchor="OAuth.Bearer">
        <front>
          <title>The OAuth 2.0 Authorization Framework: Bearer Token Usage</title>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="Dick Hardt" initials="D." surname="Hardt">
            <organization>Independent</organization>
          </author>

          <author fullname="David Recordon" initials="D." surname="Recordon">
            <organization>Facebook</organization>
          </author>

          <date day="19" month="June" year="2012" />
        </front>

        <format target="http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer"
                type="HTML" />
      </reference>

      <reference anchor="ISO639-1">
        <front>
          <title>ISO 639-1:2002. Codes for the representation of names of
          languages -- Part 1: Alpha-2 code</title>

          <author fullname="International Organization for Standardization"
                  initials="" surname="">
            <organization abbrev="ISO">International Organization for
            Standardization</organization>
          </author>

          <date year="2002" />
        </front>
      </reference>

      <reference anchor="ISO3166-1">
        <front>
          <title>ISO 3166-1:1997. Codes for the representation of names of
          countries and their subdivisions -- Part 1: Country codes</title>

          <author fullname="International Organization for Standardization"
                  initials="" surname="">
            <organization abbrev="ISO">International Organization for
            Standardization</organization>
          </author>

          <date year="1997" />
        </front>

        <format target="http://www.w3.org/WAI/ER/IG/ert/iso639.htm"
                type="HTML" />
      </reference>

      <reference anchor="E.164">
        <front>
          <title>E.164: The international public telecommunication numbering plan</title>

          <author fullname="International Telecommunication Union"
                  initials="" surname="">
            <organization abbrev="ITU">International Telecommunication Union</organization>
          </author>

          <date year="2010" />
        </front>

        <format target="http://www.itu.int/rec/T-REC-E.164-201011-I/en"
                type="HTML" />
      </reference>

      <reference anchor="zoneinfo">
        <front>
          <title>The tz database</title>

          <author fullname="" initials="" surname="">
            <organization abbrev="Public">Public Domain</organization>
          </author>

          <date month="June" year="2011" />
        </front>

        <format target="http://www.twinsun.com/tz/tz-link.htm" type="HTML" />
      </reference>

      <reference anchor="OpenID.Messages">
        <front>
          <title>OpenID Connect Messages 1.0</title>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="Ping Identity">Ping Identity</organization>
          </author>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="Breno de Medeiros" initials="B." surname="de Medeiros">
            <organization abbrev="Google">Google</organization>
          </author>

	  <author fullname="Chuck Mortimore" initials="C." surname="Mortimore">
	    <organization abbrev="Salesforce">Salesforce</organization>
	  </author>

          <author fullname="Edmund Jay" initials="E." surname="Jay">
            <organization abbrev="Illumila">Illumila</organization>
          </author>

          <date day="23" month="June" year="2012" />
        </front>

        <format target="http://openid.net/specs/openid-connect-messages-1_0.html"
                type="HTML" />
      </reference>

      <reference anchor="OpenID.Standard">
        <front>
          <title>OpenID Connect Standard 1.0</title>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute, Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="Ping Identity">Ping Identity</organization>
          </author>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="Breno de Medeiros" initials="B." surname="de Medeiros">
            <organization abbrev="Google">Google</organization>
          </author>

          <author fullname="Chuck Mortimore" initials="C." surname="Mortimore">
            <organization abbrev="Salesforce">Salesforce</organization>
          </author>

          <author fullname="Edmund Jay" initials="E." surname="Jay">
            <organization abbrev="Illumila">Illumila</organization>
          </author>

          <date day="23" month="June" year="2012" />
        </front>

        <format target="http://openid.net/specs/openid-connect-standard-1_0.html"
                type="HTML" />
      </reference>
      
      <reference anchor="OpenID.Discovery">
        <front>
          <title>OpenID Connect Discovery 1.0</title>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization>Ping Identiity</organization>
          </author>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="Edmund Jay" initials="E." surname="Jay">
            <organization abbrev="Illumila">Illumila</organization>
          </author>

          <date day="25" month="May" year="2012" />
        </front>

        <format target="http://openid.net/specs/openid-connect-discovery-1_0.html"
                type="HTML" />
      </reference>

      <reference anchor="OpenID.Registration">
        <front>
          <title>OpenID Connect Dynamic Client Registration 1.0</title>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="Ping Identity">Ping Identity</organization>
          </author>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <date day="25" month="May" year="2012" />
        </front>

        <format target="http://openid.net/specs/openid-connect-registration-1_0.html"
                type="HTML" />
      </reference>

      <reference anchor="JWT">
        <front>
          <title>JSON Web Token</title>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="Ping Identity">Ping Identity</organization>
          </author>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute, Ltd.</organization>
          </author>

          <date day="22" month="May" year="2012" />
        </front>

        <format target="http://tools.ietf.org/html/draft-ietf-oauth-json-web-token"
                type="HTML" />
      </reference>

      <reference anchor="JWS">
        <front>
          <title>JSON Web Signature</title>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="Ping Identity">Ping Identity</organization>
          </author>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute, Ltd.</organization>
          </author>

          <date day="12" month="May" year="2012" />
        </front>

        <format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-signature" type="HTML" />
      </reference>

      <reference anchor="JWE">
        <front>
          <title>JSON Web Encryption (JWE)</title>

	  <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
	    <organization>Microsoft</organization>
	  </author>

	  <author fullname="Eric Rescorla" initials="E." surname="Rescorla">
	    <organization>RTFM, Inc.</organization>
	  </author>

	  <author fullname="Joe Hildebrand" initials="J." surname="Hildebrand">
	    <organization>Cisco Systems, Inc.</organization>
	  </author>

	  <date day="12" month="May" year="2012" />
        </front>

        <format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption" type="HTML" />
      </reference>

      <reference anchor="OAuth.Responses">
        <front>
           <title>OAuth 2.0 Multiple Response Type Encoding Practices</title>

           <author fullname="Breno" initials="B." surname="de Medeiros">
             <organization abbrev="Google">Google, Inc.</organization>
           </author>

           <author fullname="Marius" initials="M." surname="Scurtescu">
             <organization abbrev="Google">Google, Inc.</organization>
           </author>

           <author fullname="Paul" initials="P." surname="Tarjan">
             <organization abbrev="Facebook"> Facebook</organization>
           </author>

           <date day="25" month="May" year="2012"></date>
        </front>

        <format target="http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html"
              type="HTML" />
      </reference>

    </references>
    <references title="Informative References">

      <reference anchor="OpenID.Basic">
        <front>
          <title>OpenID Connect Basic Client Profile 1.0</title>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
           <organization abbrev="Ping Identity">Ping Identity</organization>
          </author>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="Breno de Medeiros" initials="B."
                  surname="de Medeiros">
            <organization abbrev="Google">Google</organization>
          </author>

          <author fullname="Chuck Mortimore" initials="C." surname="Mortimore">
            <organization abbrev="Salesforce">Salesforce</organization>
          </author>

          <date day="23" month="June" year="2012" />
        </front>

        <format target="http://openid.net/specs/openid-connect-basic-1_0.html"
                type="HTML" />
      </reference>

    </references>

    <section title="Acknowledgements">
      <t>The OpenID Community would like to thank the following people for the
      work they've done in the drafting and editing of this specification.</t>
      <t>
        <list style="empty">
          <t>Andreas Akre Solberg (andreas.solberg@uninett.no), UNINET</t>
          <t>Anthony Nadalin (tonynad@microsoft.com), Microsoft</t>
          <t>Axel Nennker (axel.nennker@telekom.de), Deutsche Telekom</t>
          <t>Breno de Medeiros (breno@gmail.com), Google</t>
          <t>Casper Biering (cb@peercraft.com), Peercraft</t>
          <t>Chuck Mortimore (cmortimore@salesforce.com), Salesforce</t>
          <t>David Recordon (dr@fb.com), Facebook</t>
          <t>Edmund Jay (ejay@mgi1.com), Illumila</t>
          <t>George Fletcher (george.fletcher@corp.aol.com), AOL</t>
          <t>Hideki Nara (hideki.nara@gmail.com), Takt Communications</t>
          <t>John Bradley (ve7jtb@ve7jtb.com), Ping Identity</t>
          <t>Johnny Bufu (jbufu@janrain.com), Janrain</t>
          <t>Justin Richer (jricher@mitre.org), Mitre</t>
          <t>Luke Shepard (lshepard@fb.com), Facebook</t>
          <t>Michael B. Jones (mbj@microsoft.com), Microsoft</t>
          <t>Nat Sakimura (n-sakimura@nri.co.jp), Nomura Research Institute, Ltd. </t>
          <t>Nov Matake (nov@matake.jp), Independent</t>
          <t>Pamela Dingle (pdingle@pingidentity.com), Ping Identity</t>
          <t>Paul Tarjan (pt@fb.com), Facebook</t>
          <t>Roland Hedberg (roland.hedberg@adm.umu.se), Independent</t>
          <t>Ryo Ito (ryo.ito@mixi.co.jp), mixi, Inc.</t>
          <t>Torsten Lodderstedt (t.lodderstedt@telekom.de), Deutsche Telekom</t>
        </list>
      </t>
    </section>

    <section title="Notices">
      <t>Copyright (c) 2012 The OpenID Foundation.</t>
      <t>
	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.
      </t>
      <t>
	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.
      </t>
    </section>

    <section title="Document History">
      <t>[[ To be removed from the final specification ]]</t>

      <t>-02
        <list style="symbols">
        <t>Added <spanx style="verb">preferred_username</spanx> claim
	under <spanx style="verb">profile</spanx> scope</t>
        <t>Added ID Token section to describe required claims</t>
        <t>Added section on claim stability</t>
        </list></t>

      <t>-01
        <list style="symbols">
	  <t>Removed <spanx style="verb">claims_in_id_token</spanx> scope value,
	  per decision on June 15, 2012 special working group call</t>
      </list></t>

      <t>-00
        <list style="symbols">
	  <t>Initial version, based upon Basic Client specification version -17</t>
          <t>Renamed from Basic Client to Implicit Client, per issue #567</t>
          <t>Changed <spanx style="verb">verified</spanx> to
	  <spanx style="verb">email_verified</spanx>, per issue #564</t>
          <t>Removed Check ID Endpoint and added ID token signature verification text,
	  per issue #570</t>
          <t>Changed client.example.com to client.example.org, per issue #251</t>
	  <t>Added claims_in_id_token scope definition to Basic and Implicit,
	  per issue #594</t>
	  <t>Use standards track version of JSON Web Token spec
	  (draft-ietf-oauth-json-web-token)</t>
        </list>
      </t>

    </section>
  </back>
</rfc>
