Volker
Volker

Reputation: 1817

IdentityServer4: scope authentication attribute?

Just asking, is there any way to protect different controllers or actions with different scopes? So far I have only seen one global scope for the whole app.

In identity server 3 there seems to have been a ScopeAuthorize attribute but I can't find it in IdentityServer4.

Upvotes: 3

Views: 3349

Answers (1)

Volker
Volker

Reputation: 1817

See https://github.com/IdentityServer/IdentityServer4/issues/247 . So you create a policy and then use that policy in the Authorize Attribute.

Upvotes: 3

Related Questions