Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing policy-based ApiKey authorization #4

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@victorvogelpoel
Copy link

victorvogelpoel commented Apr 9, 2019

Adding Authorization policy where the ApiKey from Authorization is added as claim to the Principal
Added ApiKeyRequirement
Added ApiKeyRequirementHandler for asserting the ApiKey claim

I wanted to use a policy for ApiKey authorization. The Authorization package should find the ApiKey on the Authorization HEADER and add the key as claim to the current principal identity.
An authorization policy should assert the ApiKey, using a Requirement and RequirementHandler. The Controller or Action is adorned with [Authorize(Policy="ApiKeyPolicy")]

Implementing policy-based ApiKey authorization
Adding Authorization policy where the ApiKey from Authorization is added as claim to the Principal
Added ApiKeyRequirement
Added ApiKeyRequirementHandler for asserting the ApiKey claim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.