10 lines
No EOL
462 B
C#
10 lines
No EOL
462 B
C#
using Microsoft.AspNetCore.Authentication;
|
|
using System;
|
|
|
|
namespace Robware.Api.Auth.ApiKey {
|
|
public static class AuthenticationBuilderExtensions {
|
|
public static AuthenticationBuilder AddApiKeySupport(this AuthenticationBuilder authenticationBuilder, Action<ApiKeyAuthenticationOptions> options) {
|
|
return authenticationBuilder.AddScheme<ApiKeyAuthenticationOptions, ApiKeyAuthenticationHandler>(ApiKeyAuthenticationOptions.DefaultScheme, options);
|
|
}
|
|
}
|
|
} |