Answers for "how to authorize token when consuming api in c#"

C#
0

how to authorize token when consuming api in c#

// Configure the application for OAuth based flow
 PublicClientId = "self";
 OAuthOptions = new OAuthAuthorizationServerOptions
 {
 TokenEndpointPath = new PathString("/Token"),
 Provider = new ApplicationOAuthProvider(PublicClientId),
 AuthorizeEndpointPath = new PathString("/api/Account/ExternalLogin"),
 AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
 // In production mode set AllowInsecureHttp = false
 AllowInsecureHttp = true
 };
Posted by: Guest on September-16-2021

Code answers related to "how to authorize token when consuming api in c#"

C# Answers by Framework

Browse Popular Code Answers by Language