Skip to content

Commit e124478

Browse files
cleanup for 6.1 release
1 parent f89274c commit e124478

File tree

7 files changed

+12
-16
lines changed

7 files changed

+12
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# IdentityModel.AspNetCore.OAuth2Introspection
22

3-
ASP.NET Core 2 authentication handler for OAuth 2.0 token introspection
3+
ASP.NET Core authentication handler for OAuth 2.0 token introspection
44

55
https://tools.ietf.org/html/rfc7662
66

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
namespace IdentityModel.AspNetCore.OAuth2Introspection
66
{
77
/// <summary>
8-
/// Context for the RequestSending event
8+
/// Context for the SendingRequest event
99
/// </summary>
10-
public class RequestSendingContext : BaseContext<OAuth2IntrospectionOptions>
10+
public class SendingRequestContext : BaseContext<OAuth2IntrospectionOptions>
1111
{
1212
/// <summary>
1313
/// ctor
1414
/// </summary>
15-
public RequestSendingContext(
15+
public SendingRequestContext(
1616
HttpContext context,
1717
AuthenticationScheme scheme,
1818
OAuth2IntrospectionOptions options)

src/IdentityModel.AspNetCore.OAuth2Introspection.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
44

55
<PackageId>IdentityModel.AspNetCore.OAuth2Introspection</PackageId>
66
<Description>ASP.NET Core authentication handler for validating tokens using OAuth 2.0 introspection</Description>

src/OAuth2IntrospectionEvents.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class OAuth2IntrospectionEvents
2929
/// <summary>
3030
/// Invoked when sending token introspection request.
3131
/// </summary>
32-
public Func<RequestSendingContext, Task> OnRequestSending { get; set; } = context => Task.CompletedTask;
32+
public Func<SendingRequestContext, Task> OnSendingRequest { get; set; } = context => Task.CompletedTask;
3333

3434
/// <summary>
3535
/// Invoked if exceptions are thrown during request processing. The exceptions will be re-thrown after this event unless suppressed.
@@ -49,6 +49,6 @@ public class OAuth2IntrospectionEvents
4949
/// <summary>
5050
/// Invoked when sending token introspection request.
5151
/// </summary>
52-
public virtual Task RequestSending(RequestSendingContext context) => OnRequestSending(context);
52+
public virtual Task SendingRequest(SendingRequestContext context) => OnSendingRequest(context);
5353
}
5454
}

src/OAuth2IntrospectionHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ private static async Task<TokenIntrospectionResponse> LoadClaimsForToken(
180180
var introspectionClient = await options.IntrospectionClient.Value.ConfigureAwait(false);
181181
using var request = CreateTokenIntrospectionRequest(token, context, scheme, events, options);
182182

183-
var requestSendingContext = new RequestSendingContext(context, scheme, options)
183+
var requestSendingContext = new SendingRequestContext(context, scheme, options)
184184
{
185185
TokenIntrospectionRequest = request,
186186
};
187187

188-
await events.RequestSending(requestSendingContext);
188+
await events.SendingRequest(requestSendingContext);
189189

190190
return await introspectionClient.IntrospectTokenAsync(request).ConfigureAwait(false);
191191
}

test/Tests/Introspection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public async Task ActiveToken_RequestSending_AdditionalParameter_with_inline_eve
403403
{
404404
_options(o);
405405

406-
o.Events.OnRequestSending = e =>
406+
o.Events.OnSendingRequest = e =>
407407
{
408408
e.TokenIntrospectionRequest.Parameters = Parameters.FromObject(new { additionalParameter = "42" });
409409
return Task.CompletedTask;

test/Tests/Tests.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup Condition=" '$(NETCoreSdkPortableRuntimeIdentifier)' != 'osx-arm64' ">
4-
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup Condition=" '$(NETCoreSdkPortableRuntimeIdentifier)' == 'osx-arm64' ">
@@ -26,11 +26,7 @@
2626
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
2727
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.0" />
2828
</ItemGroup>
29-
30-
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
31-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="5.0.0" />
32-
</ItemGroup>
33-
29+
3430
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
3531
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.0" />
3632
</ItemGroup>

0 commit comments

Comments
 (0)