c17c9cd329
Using the short namesapce declaration for conciseness
19 lines
446 B
C#
19 lines
446 B
C#
using System;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
namespace Icarus.Authorization;
|
|
|
|
public class HasScopeRequirement : IAuthorizationRequirement
|
|
{
|
|
public string Issuer { get; }
|
|
public string Scope { get; }
|
|
|
|
|
|
public HasScopeRequirement(string scope, string issuer)
|
|
{
|
|
Scope = scope ?? throw new ArgumentNullException(nameof(scope));
|
|
Issuer = issuer ?? throw new ArgumentNullException(nameof(issuer));
|
|
}
|
|
}
|