Skip to content

Commit a647b35

Browse files
committed
update: rename to username
1 parent 0e27d36 commit a647b35

File tree

8 files changed

+7
-11
lines changed

8 files changed

+7
-11
lines changed

src/AuthServer/AuthServer.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
<ItemGroup>
3434
<FrameworkReference Include="Microsoft.AspNetCore.App" />
35+
<None Include="README.md" Pack="true" PackagePath="\" />
3536
</ItemGroup>
3637

3738
<ItemGroup>
@@ -42,8 +43,4 @@
4243
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
4344
</ItemGroup>
4445

45-
<ItemGroup>
46-
<None Include="README.md" Pack="true" PackagePath="\" />
47-
</ItemGroup>
48-
4946
</Project>

src/AuthServer/Authentication/Abstractions/IUserClaimService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ public interface IUserClaimService
1717
/// <param name="subjectIdentifier"></param>
1818
/// <param name="cancellationToken"></param>
1919
/// <returns></returns>
20-
Task<string> GetUserName(string subjectIdentifier, CancellationToken cancellationToken);
20+
Task<string> GetUsername(string subjectIdentifier, CancellationToken cancellationToken);
2121
}

src/AuthServer/Authentication/OAuthToken/OAuthTokenAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected override async Task HandleChallengeAsync(AuthenticationProperties prop
9999
}
100100
else
101101
{
102-
throw new InvalidOperationException("Challenge must happened from failure or none");
102+
throw new InvalidOperationException("Challenge must happen from failure or none");
103103
}
104104

105105
Response.StatusCode = 401;

src/AuthServer/Authorize/AuthorizeService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public async Task<ConsentGrantDto> GetConsentGrantDto(string subjectIdentifier,
7070
{
7171
var consentGrant = await _consentGrantRepository.GetConsentGrant(subjectIdentifier, clientId, cancellationToken);
7272
var cachedClient = await _cachedClientStore.Get(clientId, cancellationToken);
73-
var username = await _userClaimService.GetUserName(subjectIdentifier, cancellationToken);
73+
var username = await _userClaimService.GetUsername(subjectIdentifier, cancellationToken);
7474

7575
return new ConsentGrantDto
7676
{

src/AuthServer/Introspection/IntrospectionEndpointHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using AuthServer.Core.Abstractions;
2-
using AuthServer.Core.Request;
32
using AuthServer.Endpoints.Responses;
43
using AuthServer.Extensions;
54
using AuthServer.RequestAccessors.Introspection;

src/AuthServer/Introspection/IntrospectionRequestProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public async Task<IntrospectionResponse> Process(IntrospectionValidatedRequest r
6262
string? username = null;
6363
if (query.SubjectIdentifier is not null)
6464
{
65-
username = await _userClaimService.GetUserName(query.SubjectIdentifier, cancellationToken);
65+
username = await _userClaimService.GetUsername(query.SubjectIdentifier, cancellationToken);
6666
}
6767

6868
var subject = query.SubjectFromGrantToken ?? query.SubjectFromClientToken;

tests/AuthServer.Tests.Core/UserClaimService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public Task<IEnumerable<Claim>> GetClaims(string subjectIdentifier, Cancellation
3333
]);
3434
}
3535

36-
public Task<string> GetUserName(string subjectIdentifier, CancellationToken cancellationToken)
36+
public Task<string> GetUsername(string subjectIdentifier, CancellationToken cancellationToken)
3737
{
3838
return Task.FromResult(UserConstants.Username);
3939
}

tests/AuthServer.Tests.UnitTest/Introspection/IntrospectionRequestProcessorTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public async Task Process_ActiveToken_ExpectIsActiveIsTrue()
151151
var subjectIdentifier = new SubjectIdentifier();
152152
const string username = "JohnDoe";
153153
userClaimServiceMock
154-
.Setup(x => x.GetUserName(subjectIdentifier.Id, CancellationToken.None))
154+
.Setup(x => x.GetUsername(subjectIdentifier.Id, CancellationToken.None))
155155
.ReturnsAsync(username)
156156
.Verifiable();
157157

0 commit comments

Comments
 (0)