Skip to content

Commit

Permalink
v1.0 - Release (#12)
Browse files Browse the repository at this point in the history
* v1.0 - Release

* Bump to v1.0
  • Loading branch information
Hawxy authored Dec 18, 2023
1 parent c59b3a9 commit f2574f6
Show file tree
Hide file tree
Showing 34 changed files with 196 additions and 104 deletions.
4 changes: 2 additions & 2 deletions Package.Build.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project>
<PropertyGroup>
<Version>1.0.0-beta.1</Version>
<Version>1.0.0</Version>
<Authors>Hawxy</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Hawxy/Fga.Net</PackageProjectUrl>
<RepositoryUrl>https://github.com/Hawxy/Fga.Net</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Copyright>Hawxy 2022-2023</Copyright>
<Copyright>Hawxy 2022-2024</Copyright>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Fga.Net.DependencyInjection?label=Fga.Net.DependencyInjection&style=flat-square)](https://www.nuget.org/packages/Fga.Net.DependencyInjection)
[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Fga.Net.AspNetCore?label=Fga.Net.AspNetCore&style=flat-square)](https://www.nuget.org/packages/Fga.Net.AspNetCore)

#### Note: This project is currently in beta. Breaking changes may occur before release.

### Packages
**`Fga.Net.DependencyInjection`**: Provides dependency injection/configuration extensions for [OpenFga.Sdk](https://github.com/openfga/dotnet-sdk)

Expand Down
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="7.0.2" />
<PackageReference Include="Nuke.Common" Version="7.0.6" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions samples/Fga.Example.AspNetCore/Fga.Example.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>e566b5e2-c31c-477a-968d-5f9b0e90ec02</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions samples/Fga.Example.AspNetCore/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
};
});

builder.Services.AddHttpLogging(x => { });

// Auth0 FGA
builder.Services.AddOpenFgaClient(config =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>dotnet-Fga.Example.GenericHost-9C6D4616-909E-4604-983E-E53E717DECFB</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/*
Copyright 2021-2023 Hawxy
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
using Microsoft.AspNetCore.Http;
#region License
/*
Copyright 2021-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion

using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
using Fga.Net.AspNetCore.Exceptions;
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion

using Fga.Net.AspNetCore.Exceptions;
using Microsoft.AspNetCore.Http;

namespace Fga.Net.AspNetCore.Authorization.Attributes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
using System.Text.Json;
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
using System.Text.Json;
using Fga.Net.AspNetCore.Exceptions;
using Microsoft.AspNetCore.Http;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
using Fga.Net.AspNetCore.Exceptions;
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
using Fga.Net.AspNetCore.Exceptions;
using Microsoft.AspNetCore.Http;

namespace Fga.Net.AspNetCore.Authorization.Attributes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
using Fga.Net.AspNetCore.Exceptions;
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
using Fga.Net.AspNetCore.Exceptions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/*
Copyright 2021-2023 Hawxy
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/*
Copyright 2021-2023 Hawxy
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
20 changes: 18 additions & 2 deletions src/Fga.Net.AspNetCore/Authorization/FgaCheckDecorator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
using OpenFga.Sdk.Api;
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion

using OpenFga.Sdk.Client;
using OpenFga.Sdk.Client.Model;
using OpenFga.Sdk.Model;

namespace Fga.Net.AspNetCore.Authorization;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/*
Copyright 2021-2023 Hawxy
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/*
Copyright 2021-2023 Hawxy
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/Fga.Net.AspNetCore/Authorization/Log.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/*
Copyright 2021-2023 Hawxy
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
17 changes: 17 additions & 0 deletions src/Fga.Net.AspNetCore/Authorization/MinimalApiExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
using Fga.Net.AspNetCore.Authorization.Attributes;
using Microsoft.AspNetCore.Builder;

Expand Down
17 changes: 17 additions & 0 deletions src/Fga.Net.AspNetCore/Authorization/Validation.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
namespace Fga.Net.AspNetCore.Authorization;

internal static class Validation
Expand Down
61 changes: 0 additions & 61 deletions src/Fga.Net.AspNetCore/Controllers/FgaControllerBase.cs

This file was deleted.

19 changes: 18 additions & 1 deletion src/Fga.Net.AspNetCore/Exceptions/FgaMiddlewareException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
namespace Fga.Net.AspNetCore.Exceptions;
#region License
/*
Copyright 2021-2024 Hawxy (JT)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion
namespace Fga.Net.AspNetCore.Exceptions;

/// <summary>
/// Custom exception for FGA middleware internals.
Expand Down
Loading

0 comments on commit f2574f6

Please sign in to comment.