Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ csharp_style_prefer_null_check_over_type_check = true:suggestion

# Modifier preferences
csharp_prefer_static_local_function = true:suggestion
csharp_prefer_static_anonymous_function = true:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent

# Code-block preferences
Expand All @@ -139,9 +140,11 @@ csharp_prefer_system_threading_lock = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = false:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_prefer_unbound_generic_type_in_nameof = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:none
csharp_style_unused_value_expression_statement_preference = discard_variable:none
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/publish_abstractions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Publish Abstractions on NuGet

permissions:
contents: write

id-token: write

on:
push:
branches: [ master ]
Expand Down Expand Up @@ -42,8 +43,14 @@ jobs:
- name: Package
run: dotnet pack -c Release -o . '${{ env.PROJECT_NAME }}/${{ env.PROJECT_FILE }}'

- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}

- name: Publish on NuGet
run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
run: dotnet nuget push *.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
Comment on lines 52 to +53

- name: Create release
uses: softprops/action-gh-release@v2
Expand Down
14 changes: 8 additions & 6 deletions SimpleAuthentication.slnx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Solution>
<Folder Name="/Samples/" />
<Folder Name="/Samples/Controllers/">
<Folder Name="/samples/" />
<Folder Name="/samples/Controllers/">
<Project Path="samples/Controllers/ApiKeySample/ApiKeySample.csproj" />
<Project Path="samples/Controllers/BasicAuthenticationSample/BasicAuthenticationSample.csproj" />
<Project Path="samples/Controllers/JwtBearerSample/JwtBearerSample.csproj" />
</Folder>
<Folder Name="/Samples/Minimal APIs/">
<Folder Name="/samples/Minimal APIs/">
<Project Path="samples/MinimalApis/ApiKeySample/ApiKeySample.csproj" />
<Project Path="samples/MinimalApis/BasicAuthenticationSample/BasicAuthenticationSample.csproj" />
<Project Path="samples/MinimalApis/JwtBearerSample/JwtBearerSample.csproj" />
Expand All @@ -15,7 +15,9 @@
<File Path=".editorconfig" />
<File Path="src/Directory.Build.props" />
</Folder>
<Project Path="src/SimpleAuthentication.Abstractions/SimpleAuthentication.Abstractions.csproj" />
<Project Path="src/SimpleAuthentication.Swashbuckle/SimpleAuthentication.Swashbuckle.csproj" />
<Project Path="src/SimpleAuthentication/SimpleAuthentication.csproj" />
<Folder Name="/src/">
<Project Path="src/SimpleAuthentication.Abstractions/SimpleAuthentication.Abstractions.csproj" />
<Project Path="src/SimpleAuthentication.Swashbuckle/SimpleAuthentication.Swashbuckle.csproj" />
<Project Path="src/SimpleAuthentication/SimpleAuthentication.csproj" />
</Folder>
</Solution>
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.10.94" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ namespace SimpleAuthentication.Permissions;
/// </remarks>
/// <param name="permissions">The permission list to require for authorization.</param>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class PermissionAttribute(params string[] permissions) : AuthorizeAttribute(string.Join(",", permissions))
{
}
public class PermissionAttribute(params string[] permissions) : AuthorizeAttribute(string.Join(",", permissions));
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.28" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.31" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.17" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.20" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading