Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
renamed setpassword to changepassword in identity service
Browse files Browse the repository at this point in the history
  • Loading branch information
henryhchchc committed Feb 4, 2018
1 parent 0d3d8e3 commit 0cc429d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/Obsidian.Application/Obsidian.Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
<DebugType>Full</DebugType>
</PropertyGroup>

<ItemGroup>
<Compile Remove="UserManagement\UpdateUserSaga.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Obsidian.Domain\Obsidian.Domain.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Obsidian.Application/Services/IIdentityService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface IIdentityService

Task<User> GetCurrentUserAsync();

Task SetCurrentUserPasswordAsync(string oldPassword,string newPassword);
Task ChangeCurrentUserPasswordAsync(string oldPassword,string newPassword);

Task SetCurrentUsernameAsync(string newUsername);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task<IActionResult> GetProfile()
[HttpPut("Password")]
public async Task<IActionResult> SetPassword([FromBody]UpdateAccountPasswordDto dto)
{
await _identityService.SetCurrentUserPasswordAsync(dto.OldPassword, dto.NewPassword);
await _identityService.ChangeCurrentUserPasswordAsync(dto.OldPassword, dto.NewPassword);
return NoContent();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Obsidian/Services/IdentityService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public async Task SetCurrentUsernameAsync(string newUsername)
}
}

public async Task SetCurrentUserPasswordAsync(string oldPassword, string newPassword)
public async Task ChangeCurrentUserPasswordAsync(string oldPassword, string newPassword)
{
var claim = _accessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier);
if (claim is Claim c && Guid.TryParse(c.Value, out var userId))
Expand Down

0 comments on commit 0cc429d

Please sign in to comment.