Skip to content

Instantly share code, notes, and snippets.

@CoderBK
Created January 13, 2022 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CoderBK/a2c80d77de383d43bebed1a662daff29 to your computer and use it in GitHub Desktop.
Save CoderBK/a2c80d77de383d43bebed1a662daff29 to your computer and use it in GitHub Desktop.
using AzureFunctionAuthorization.IService;
using Microsoft.Azure.WebJobs.Host.Bindings;
using System.Threading.Tasks;
namespace AzureFunctionAuthorization.Binding {
public class JWTAuthorizationBindingProvider : IBindingProvider {
private readonly IJWTHandlerService _jWTHandlerService;
public JWTAuthorizationBindingProvider(IJWTHandlerService jWTHandlerService) {
_jWTHandlerService = jWTHandlerService;
}
public Task<IBinding> TryCreateAsync(BindingProviderContext context) {
return Task.FromResult<IBinding>(new JWTAuthorizationBinding(_jWTHandlerService));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment