Skip to content

Commit c256aac

Browse files
committed
chore: removed some compiler warnings
1 parent 3267e4a commit c256aac

File tree

14 files changed

+64
-55
lines changed

14 files changed

+64
-55
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
"rollForward": false
1111
},
1212
"dotnet-outdated-tool": {
13-
"version": "4.6.7",
13+
"version": "4.6.8",
1414
"commands": [
1515
"dotnet-outdated"
1616
],
1717
"rollForward": false
1818
},
1919
"dotnet-ef": {
20-
"version": "9.0.2",
20+
"version": "9.0.8",
2121
"commands": [
2222
"dotnet-ef"
2323
],
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Id": "9d1b3a32-7eb4-4f00-afc5-bca2ba25f9d6",
3+
"IssueId": "",
4+
"Prefix": "Added",
5+
"Tag": "",
6+
"Message": "Addes support for ClientCredentials flow in sample server.",
7+
"CreatedAt": "2025-08-24T09:15:29.6713415+00:00",
8+
"CreatedBy": "thomasduft"
9+
}

src/identity/OpenIddict.UI.Identity.Api/Account/AccountApiService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ public async Task<UserViewModel> GetUserAsync(string id)
7676
Email = user.Email,
7777
LockoutEnabled = user.LockoutEnabled,
7878
IsLockedOut = user.IsLockedOut,
79-
Claims = new List<ClaimViewModel>(user.Claims.Select(x =>
79+
Claims = [.. user.Claims.Select(x =>
8080
{
8181
return new ClaimViewModel
8282
{
8383
Type = x.Type,
8484
Value = x.Value
8585
};
86-
})),
86+
})],
8787
Roles = user.Roles
8888
};
8989
}
@@ -98,14 +98,14 @@ public async Task<IdentityResult> UpdateAsync(UserViewModel model)
9898
}
9999

100100
var param = SimpleMapper.From<UserViewModel, UserParam>(model);
101-
param.Claims = new List<ClaimInfo>(model.Claims.Select(c =>
101+
param.Claims = [.. model.Claims.Select(c =>
102102
{
103103
return new ClaimInfo
104104
{
105105
Type = c.Type,
106106
Value = c.Value
107107
};
108-
}));
108+
})];
109109

110110
return await _accountService.UpdateAsync(param);
111111
}

src/identity/OpenIddict.UI.Identity.Core/Interfaces/IAccountService.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ namespace tomware.OpenIddict.UI.Identity.Core;
66

77
public interface IAccountService
88
{
9-
Task<IdentityResult> RegisterAsync(RegisterUserParam model);
10-
Task<IdentityResult> ChangePasswordAsync(ChangePasswordParam model);
11-
Task<IEnumerable<UserInfo>> GetUsersAsync();
12-
Task<UserInfo> GetUserAsync(string id);
13-
Task<IdentityResult> UpdateAsync(UserParam model);
14-
Task<IdentityResult> DeleteAsync(string id);
9+
public Task<IdentityResult> RegisterAsync(RegisterUserParam model);
10+
public Task<IdentityResult> ChangePasswordAsync(ChangePasswordParam model);
11+
public Task<IEnumerable<UserInfo>> GetUsersAsync();
12+
public Task<UserInfo> GetUserAsync(string id);
13+
public Task<IdentityResult> UpdateAsync(UserParam model);
14+
public Task<IdentityResult> DeleteAsync(string id);
1515
}

src/identity/OpenIddict.UI.Identity.Core/Interfaces/IClaimTypeService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ namespace tomware.OpenIddict.UI.Identity.Core;
66

77
public interface IClaimTypeService
88
{
9-
Task<IEnumerable<ClaimTypeInfo>> GetClaimTypesAsync();
9+
public Task<IEnumerable<ClaimTypeInfo>> GetClaimTypesAsync();
1010

11-
Task<ClaimTypeInfo> GetAsync(Guid id);
11+
public Task<ClaimTypeInfo> GetAsync(Guid id);
1212

13-
Task<Guid> CreateAsync(ClaimTypeParam model);
13+
public Task<Guid> CreateAsync(ClaimTypeParam model);
1414

15-
Task UpdateAsync(ClaimTypeParam model);
15+
public Task UpdateAsync(ClaimTypeParam model);
1616

17-
Task DeleteAsync(Guid id);
17+
public Task DeleteAsync(Guid id);
1818
}

src/identity/OpenIddict.UI.Identity.Core/Interfaces/IUserCreationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ public interface IUserCreationStrategy<TIdentityUser, TKey>
77
where TKey : IEquatable<TKey>
88
where TIdentityUser : IdentityUser<TKey>
99
{
10-
TIdentityUser CreateUser(RegisterUserParam model);
10+
public TIdentityUser CreateUser(RegisterUserParam model);
1111
}

src/identity/OpenIddict.UI.Identity.Infrastructure/Data/OpenIddictUIIdentityContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class OpenIddictUIIdentityStoreOptions
1212

1313
public interface IOpenIddictUIIdentityContext
1414
{
15-
DbSet<ClaimType> ClaimTypes { get; set; }
15+
public DbSet<ClaimType> ClaimTypes { get; set; }
1616
}
1717

1818
public class OpenIddictUIIdentityContext : OpenIddictUIIdentityContext<OpenIddictUIIdentityContext>

src/identity/OpenIddict.UI.Identity.Infrastructure/Services/AccountService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ public async Task<UserInfo> GetUserAsync(string id)
8282
Email = user.Email,
8383
LockoutEnabled = user.LockoutEnabled,
8484
IsLockedOut = isLockedOut,
85-
Claims = new List<ClaimInfo>(claims.ToList().Select(x =>
85+
Claims = [.. claims.ToList().Select(x =>
8686
{
8787
return new ClaimInfo
8888
{
8989
Type = x.Type,
9090
Value = x.Value
9191
};
92-
})),
92+
})],
9393
Roles = [.. roles]
9494
};
9595
}
@@ -116,10 +116,10 @@ public async Task<IdentityResult> UpdateAsync(UserParam model)
116116

117117
result = await AssignClaimsAsync(
118118
user,
119-
model.Claims.Select(x =>
119+
[.. model.Claims.Select(x =>
120120
{
121121
return new Claim(x.Type, x.Value);
122-
}).ToList()
122+
})]
123123
);
124124
if (!result.Succeeded)
125125
{

src/openiddict/OpenIddict.UI.Infrastructure/Data/OpenIddictUIContext.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ public class OpenIddictUIStoreOptions
1212

1313
public interface IOpenIddictUIContext
1414
{
15-
DbSet<OpenIddictEntityFrameworkCoreApplication> Applications { get; set; }
15+
public DbSet<OpenIddictEntityFrameworkCoreApplication> Applications { get; set; }
1616

17-
DbSet<OpenIddictEntityFrameworkCoreAuthorization> Authorizations { get; set; }
17+
public DbSet<OpenIddictEntityFrameworkCoreAuthorization> Authorizations { get; set; }
1818

19-
DbSet<OpenIddictEntityFrameworkCoreScope> Scopes { get; set; }
19+
public DbSet<OpenIddictEntityFrameworkCoreScope> Scopes { get; set; }
2020

21-
DbSet<OpenIddictEntityFrameworkCoreToken> Tokens { get; set; }
21+
public DbSet<OpenIddictEntityFrameworkCoreToken> Tokens { get; set; }
2222
}
2323

2424
public class OpenIddictUIContext : OpenIddictUIContext<OpenIddictUIContext>

src/openiddict/OpenIddict.UI.Infrastructure/Interfaces/IApplicationService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ namespace tomware.OpenIddict.UI.Infrastructure;
55

66
public interface IApplicationService
77
{
8-
Task<IEnumerable<ApplicationInfo>> GetApplicationsAsync();
8+
public Task<IEnumerable<ApplicationInfo>> GetApplicationsAsync();
99

10-
Task<ApplicationInfo> GetAsync(string id);
10+
public Task<ApplicationInfo> GetAsync(string id);
1111

12-
Task<string> CreateAsync(ApplicationParam model);
12+
public Task<string> CreateAsync(ApplicationParam model);
1313

14-
Task UpdateAsync(ApplicationParam model);
14+
public Task UpdateAsync(ApplicationParam model);
1515

16-
Task DeleteAsync(string id);
16+
public Task DeleteAsync(string id);
1717
}

0 commit comments

Comments
 (0)