Purpose of options.AutomaticAuthenticate with UseJwtBearerAuthentication
<p>After updating a codebase from ASP 5 beta 7 to RC1-final, I began receiving this exception from the JwtBearer middleware</p>

<pre><code>Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'System.IConvertible'.
</code></pre>

<p>The determining factor I can see so far appears to be the setting of  options.AutomaticAuthenticate.  If it's <code>true</code>, then I get the exception, otherwise, I do not.</p>

<p>What is AutomaticAuthenticate and why would I need to enable it?</p>

<pre><code>    app.UseJwtBearerAuthentication(options =&gt;
    {
        options.AutomaticAuthenticate = true; 
    }
</code></pre>

<p>Here is the full stack trace:</p>

<pre><code>at System.Convert.ToInt32(Object value, IFormatProvider provider)
   at System.IdentityModel.Tokens.Jwt.JwtPayload.GetIntClaim(String claimType)
   at System.IdentityModel.Tokens.Jwt.JwtPayload.get_Nbf()
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken&amp; validatedToken)
   at Microsoft.AspNet.Authentication.JwtBearer.JwtBearerHandler.&lt;HandleAuthenticateAsync&gt;d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNet.Authentication.JwtBearer.JwtBearerHandler.&lt;HandleAuthenticateAsync&gt;d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.AspNet.Authentication.AuthenticationHandler`1.&lt;InitializeAsync&gt;d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.&lt;Invoke&gt;d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Api.Startup.&lt;&lt;Configure&gt;b__9_0&gt;d.MoveNext() in ...\Startup.cs:line 156
</code></pre>

<p><strong>Update on root cause</strong></p>

<p>Our codebase was creating duplicate claims for nbf, exp, and iat.  That explains why get_Nbf is in the stack trace and the complaint about "JArray" since each of those values was an array instead of a value.</p>