Parameter route in ASP.NET Web API using OWIN OAuthAuthorization

I am trying to use a route like "/ api / {culture} / token" for my OAuth authorization process in my web API, but I am not successful with that.

 var options = new OAuthAuthorizationServerOptions()
        {
            AllowInsecureHttp = true,
            TokenEndpointPath = new PathString("/api/{culture}/token"),
            AccessTokenExpireTimeSpan = TimeSpan.FromDays(1),
            Provider = new SimpleAuthorizationServerProvider()
        };

      

I've seen how to access query string parameters as described here , but would it be better to name this route like, say, api / en-US / token instead of api / token /? auth_parameters & culture = en-US

+3


source to share





All Articles