Reputation: 25080
I walkthrough http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api tutorial to implement ASP.NET WebApi Bearer Token authentication.
As I access to [Authorize]
methods with published bearer token after I stop/restart/deploy on Azure WebSite, it still can access to them. Moreover, I can access with two different devices (different tokens for same identity), still can access.
I don't know deep inside of token identication mechanism, but seems like the published bearer tokens do not be maintained in server memory nor in database.
My question can be summarized as below...
Upvotes: 4
Views: 2178
Reputation: 593
AccessTokenExpireTimeSpan = TimeSpan.FromDays(14)
app.UseOAuthBearerTokens(OAuthOptions);
This is on a per server basis, and there are other token providers to support multiple instances of a server e.g. facebook, google, microsoft account, twitter, or you can roll your own.Upvotes: 2