Esempio n. 1
0
 /// <summary>
 /// Withes the bearer token.
 /// </summary>
 /// <param name="this">The webserver.</param>
 /// <param name="baseUrlPath">The base URL path.</param>
 /// <param name="secretKeyString">The secret key string.</param>
 /// <param name="authorizationProvider">The authorization provider.</param>
 /// <returns>
 /// The same web server.
 /// </returns>
 public static IWebServer WithBearerToken(
     this IWebServer @this,
     string baseUrlPath,
     string secretKeyString,
     IAuthorizationServerProvider?authorizationProvider = null) =>
 @this.WithModule(
     new BearerTokenModule(
         baseUrlPath,
         authorizationProvider ?? new BasicAuthorizationServerProvider(),
         secretKeyString));