ASP.net Web API令牌在句点设置时间之前到期

时间:2015-04-03 04:22:49

标签: c# asp.net asp.net-web-api owin

当我将过期时间设为14天时,如下风暴

OAuthOptions = new OAuthAuthorizationServerOptions 
 {
    TokenEndpointPath = new PathString("/Token"),
    Provider = new ApplicationOAuthProvider(PublicClientId),
    AuthorizeEndpointPath = new PathString("/api/Account/ExternalLogin"),
    AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
    AllowInsecureHttp = true
 };
 app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
 app.UseOAuthBearerTokens(OAuthOptions);

它在localhost中工作正常,但是当我部署到Web服务器时,令牌会在15或20分钟后过期。

我在某处错过了设置吗?

0 个答案:

没有答案