C#C
C#4y ago
43 replies
Welles

.net core webapi2 API key authorization

I was wondering what the absolute best practice was to implement API key authorization for your controllers?

- Using middleware (as I'm doing now)
- Using Authentication Filters (api key is not really authentication)

I'm guessing that if I need only a couple endpoints to be secured I need to use filters, if not I can use middleware?

Best regards!
Was this page helpful?