Altinn / altinn-accesstoken

Client and server libraries for simple authorization of API calls
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Add IAccessTokenRequirement #17

Closed SandGrainOne closed 1 year ago

SandGrainOne commented 1 year ago

Description

Adding an interface to describe an access token requirement. The goal is to make it easier/possible to create additional requirements that can use the implemented AuthorizationHandler in combination with other handlers.

In Events we are in need of a requirement that can do both Scope and AccessToken verification and succeed if one of them resolves successfully.

https://learn.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-7.0#why-would-i-want-multiple-handlers-for-a-requirement

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication