private async Task AddIdentityResources()
    {
        var identityResource1 = new IdentityResource(_testData.IdentityResource1Id, "NewIdentityResource1")
        {
            Description = nameof(Client.Description),
            DisplayName = nameof(IdentityResource.DisplayName)
        };

        identityResource1.AddUserClaim(nameof(ApiResourceClaim.Type));

        await _identityResourceRepository.InsertAsync(identityResource1);

        await _identityResourceRepository.InsertAsync(new IdentityResource(_guidGenerator.Create(), "NewIdentityResource2"));

        await _identityResourceRepository.InsertAsync(new IdentityResource(_guidGenerator.Create(), "NewIdentityResource3"));

        var identityResource2 = new IdentityResource(_guidGenerator.Create(), "Test-Identity-Resource-Name-1")
        {
            Description = "Test-Identity-Resource-Description-1",
            DisplayName = "Test-Identity-Resource-DisplayName-1",
            Required    = true,
            Emphasize   = true
        };

        identityResource2.AddUserClaim("Test-Identity-Resource-1-IdentityClaim-Type-1");
        await _identityResourceRepository.InsertAsync(identityResource2);
    }
        private void AddIdentityResources()
        {
            var identityResource = new IdentityResource(_guidGenerator.Create(), "Test-Identity-Resource-Name-1")
            {
                Description = "Test-Identity-Resource-Description-1",
                DisplayName = "Test-Identity-Resource-DisplayName-1",
                Required    = true,
                Emphasize   = true
            };

            identityResource.AddUserClaim("Test-Identity-Resource-1-IdentityClaim-Type-1");

            _identityResourceRepository.Insert(identityResource);
        }
Esempio n. 3
0
        private async Task AddIdentityResources()
        {
            var identityResource = new IdentityResource(_guidGenerator.Create(), "Test-Identity-Resource-Name-1")
            {
                Description = "Test-Identity-Resource-Description-1",
                DisplayName = "Test-Identity-Resource-DisplayName-1",
                Required    = true,
                Emphasize   = true
            };

            identityResource.AddUserClaim("Test-Identity-Resource-1-IdentityClaim-Type-1");

            await _identityResourceRepository.InsertAsync(identityResource).ConfigureAwait(false);
        }