/// <summary> /// Determines if authentication is scoped and uses package verify claim. /// </summary> public static bool HasPackageVerifyScopeClaim(this IIdentity self) { var scopeClaim = self.GetScopeClaim(); return(!ScopeEvaluator.IsEmptyScopeClaim(scopeClaim) && ScopeEvaluator.ScopeClaimsAllowsActionForSubject(scopeClaim, subject: null, requestedActions: new [] { NuGetScopes.PackageVerify })); }
public static bool IsScopedAuthentication(this IIdentity self) { var scopeClaim = self.GetScopeClaim(); return(!ScopeEvaluator.IsEmptyScopeClaim(scopeClaim)); }