Template for OAuth error page

The error page is returned to the resource owner when a nonprotocol error occurs during the processing of a request that the resource owner submits.

For example, an invalid redirection URI or improperly submitted authorization form results in a nonprotocol error.

The <xsl:template> node for the error page portion of the stylesheet uses the following variables.
error
The context/oauth/error variable contains the error string that indicates the reason for the failure; for example, invalid_client. This variable is always in the input for an error case.
error_description
The context/oauth/error_description variable contains a description for the failure.
error_uri
The context/oauth/error_uri variable contains the unique error URI.

The following code is a modified excerpt from the OAuth-Generate-HTML.xsl example stylesheet that defines the error page. See the annotated stylesheet in the store: directory for completeness.

<xsl:template name="error-page">
  <xsl:param name="input" select="/.."/>
  <xsl:variable name="error" select="$input/oauth/error"/>
    …
  <xsl:variable name="error_uri" select="$input/oauth/error_uri"/>

  <html>
    <head>…</head>
    <body>
      <h1>OAuth Error</h1>
      <p>An error occurred while processing the OAuth request.</p>
      <table>
        <tr>
          <td>Error</td>
          <td><xsl:value-of select="$error" /></td>
        </tr>
        <tr>
          <td>Error description</td>
          <td><xsl:value-of select="$error_description" /></td>
        </tr>
      </table>
    </body>
  </html>
</xsl:template>