コード例 #1
0
        public override async Task <IEnumerable <Claim> > GetAccessTokenClaimsAsync(ClaimsPrincipal subject, Resources resources, ValidatedRequest request)
        {
            var claims = (await base.GetAccessTokenClaimsAsync(subject, resources, request)).ToList();

            if (request.Client.ClientId == "service.tagov.devops")
            {
                claims.AddRange(_claimsProvider.GetFullSecurityClaims());
                return(claims);
            }

            if (request.Client.ClientId.StartsWith("service."))
            {
                claims.AddRange(_claimsProvider.GetFullApplicationClaims());
                return(claims);
            }

            return(subject.Claims);
        }