Skip to content
Merged

fixes #1006

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions SecurityService.Client/SecurityServiceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ public async Task<Result<ApiScopeDetails>> GetApiScope(String apiScopeName,

public async Task<Result<List<ApiScopeDetails>>> GetApiScopes(CancellationToken cancellationToken)
{
List<ApiScopeDetails> response = null;
String requestUri = this.BuildRequestUrl("/api/apiscopes");

try
Expand Down Expand Up @@ -434,7 +433,6 @@ public async Task<Result<ClientDetails>> GetClient(String clientId,

public async Task<Result<List<ClientDetails>>> GetClients(CancellationToken cancellationToken)
{
List<ClientDetails> response = null;
String requestUri = this.BuildRequestUrl("/api/clients");

try
Expand Down Expand Up @@ -569,7 +567,6 @@ public async Task<Result<RoleDetails>> GetRole(Guid roleId,

public async Task<Result<List<RoleDetails>>> GetRoles(CancellationToken cancellationToken)
{
List<RoleDetails> response = null;
String requestUri = this.BuildRequestUrl("/api/roles");

try
Expand Down Expand Up @@ -734,7 +731,6 @@ private async Task<Result<TokenResponse>> GetToken(String tokenRequest,
CancellationToken cancellationToken)
{
String requestUri = this.BuildRequestUrl("/connect/token");
String content = null;

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public async Task<IActionResult> OnGet(String returnUrl)
return Page();
}

public const String PasswordsDontMatch = "New Password does not match Confirm Password";
private const String DontMatchMessage = "New Password does not match Confirm Password";

public const String ErrorChangingPassword = "An error occurred changing password";
private const String ErrorChangingMessage = "An error occurred changing password";

public async Task<IActionResult> OnPost(CancellationToken cancellationToken) {
await BuildModelAsync(Input.ReturnUrl);
Expand All @@ -60,15 +60,15 @@ public async Task<IActionResult> OnPost(CancellationToken cancellationToken) {

if (String.CompareOrdinal(Input.NewPassword, Input.ConfirmPassword) != 0) {
await BuildModelAsync(Input.ReturnUrl);
ModelState.AddModelError(String.Empty, PasswordsDontMatch);
ModelState.AddModelError(String.Empty, DontMatchMessage);
return this.Page();
}

SecurityServiceCommands.ChangeUserPasswordCommand command = new(Input.Username, Input.CurrentPassword, Input.NewPassword, Input.ClientId);
Result<ChangeUserPasswordResult>? result = await this.Mediator.Send(command, cancellationToken);

if (result.IsFailed) {
ModelState.AddModelError(String.Empty, ErrorChangingPassword);
ModelState.AddModelError(String.Empty, ErrorChangingMessage);
return this.Page();
}

Expand Down
2 changes: 1 addition & 1 deletion SecurityService.UserInterface/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
[AllowAnonymous]
public class Index : PageModel
{
public string Version;
public string Version { get; private set; }

public void OnGet()
{
Version = typeof(Duende.IdentityServer.Hosting.IdentityServerMiddleware).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion.Split('+').First();

Check warning on line 16 in SecurityService.UserInterface/Pages/Index.cshtml.cs

View workflow job for this annotation

GitHub Actions / Build and Unit Test Pull Requests - Non UI

Possible null reference assignment.
}
Expand Down
Loading