Redirect to URL instead of 401 for unauthenticated
<p>I am using ASP.Net 5 MVC 6 with JWT tokens that are created while the user is on another site which this site is a subdomain of.  My goal is to pass the token along with the request to this subdomain.  If a user happens to try to come to this subdomain url without the proper token in the header then I want to redirect them to the main site login page.</p>

<p>After much frustration with the newest RC-1 release and using JWT tokens with a <code>SecureKey</code> instead of certificates. I finally got my code working by using the RC-2 nightly build version.  Now my problem is that I want to be able to redirect to an outside url in the case of unauthenticated users.  Here is an example of my authentication code:</p>

<pre><code>        var key = "mysupersecretkey=";
        var encodedkey2 = Convert.FromBase64String(key);
        app.UseJwtBearerAuthentication(options =&gt;
        {
            options.AutomaticAuthenticate = true;
            options.AutomaticChallenge = true;
            options.TokenValidationParameters.IssuerSigningKey = new SymmetricSecurityKey(encodedkey2);
            options.TokenValidationParameters.ValidIssuer = "https://tv.alsdkfalsdkf.com/xxx/yyy";
            options.TokenValidationParameters.ValidateIssuer = true;
            options.TokenValidationParameters.ValidAudience = "https://www.sdgfllfsdkgh.com/";
            options.TokenValidationParameters.ValidateAudience = true;
            options.Configuration = new Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration()
            {
                Issuer = "https://tv.sdfkaysdf.com/xxx/yyy"
            };
        });
</code></pre>

<p>now I see other examples which are using OpedId and they have it pretty easy , there is a parameter called <code>RedirectUrl</code></p>

<pre><code> app.UseOpenIdConnectAuthentication(options =&gt; {
    ...
    options.RedirectUri = "https://localhost:44300";
    ...
 });
</code></pre>

<p>any idea how to set <code>RedirectUrl</code> when using <code>JwtBearerAuthentication</code> ??? </p>