How come online i see both of these? Is there any difference?
var OAuthOptions = new OAuthAuthorizationServerOptions
{
TokenEndpointPath = new PathString("/Token"),
AuthorizeEndpointPath = new PathString("/Account/Authorize"),
Provider = new SimpleAuthorizationServerProvider(UserRepository, UserStore),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
AllowInsecureHttp = true
};
app.UseOAuthBearerTokens(OAuthOptions);
and
app.UseOAuthAuthorizationServer(new OAuthAuthorizationServerOptions
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromHours(8),
Provider = new SimpleAuthorizationServerProvider(UserRepository, UserStore)
});
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
How come the method UseOAuthBearerTokens takes in OAuthAuthorizationServerOptions as a parameter?