Tuitio.Wrapper nuget package changes

master
Tudor Stanciu 2023-02-28 18:40:51 +02:00
parent 6630019135
commit 0fcdbd10d0
5 changed files with 57 additions and 5 deletions

View File

@ -8,7 +8,7 @@ namespace Tuitio.Wrapper
{ {
public static class DependencyInjectionExtension public static class DependencyInjectionExtension
{ {
public static void UseIdentityServices(this IServiceCollection services, string baseAddress) public static void UseTuitioServices(this IServiceCollection services, string baseAddress)
{ {
services.AddSingleton(new ServiceConfiguration(baseAddress)); services.AddSingleton(new ServiceConfiguration(baseAddress));
services.AddHttpClient<IIdentityService, IdentityService>(); services.AddHttpClient<IIdentityService, IdentityService>();

View File

@ -0,0 +1,38 @@
# Tuitio.Wrapper
[Tuitio](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio) is a simple identity server implementation focused strictly on the needs of my home lab.
***Tuitio.Wrapper*** is a NuGet package that facilitates integration with a Tuitio instance in a .NET environment by registering a service called IIdentityService in the application's service collection.
It contains two methods, "Authenticate" and "Authorize", which are responsible for calling the appropriate methods from the API controller, ```/identity/authenticate``` or ```/identity/authorize```. These methods provide a simple and convenient way for developers to handle authentication and authorization when communicating with the API controller.
Once the package is installed, all the developer has to do is call the ```UseTuitioServices``` method the application startup. After this step, IIdentityService can be injected into any class in the application.
## Package repository
Tuitio.Wrapper can be installed from my self hosted NuGet feed: https://lab.code-rove.com/public-nuget-server/
## Installation
### Visual Studio
#### NuGet.config file
```xml=!
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="lab.nuget" value="https://lab.code-rove.com/public-nuget-server/v3/index.json" />
</packageSources>
</configuration>
```
Configure the above file in the Visual Studio solution or set the new NuGet feed in NuGet Package Manager. After one of this steps, Tuitio.Wrapper can be installed using NuGet Package Manager.
### CLI
```bash=!
dotnet add package Tuitio.Wrapper --source https://lab.code-rove.com/public-nuget-server/v3/index.json
```
Run the above command in a console open in a .NET project directory.

View File

@ -0,0 +1,3 @@
2.0.0 release [2023-01-31 02:17]
◾ Tuitio rebranding
◾ Initial release of Tuitio's API wrapper

View File

@ -2,13 +2,18 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Description>Tuitio wrapper</Description> <Description>Tuitio.Wrapper facilitates integration with a Tuitio instance in a .NET environment by registering a service called IIdentityService in the applications service collection. It contains two methods that provide a simple and convenient way for developers to handle authentication and authorization when communicating with the Tuitios API controller.</Description>
<PackageReleaseNotes>Tuitio wrapper</PackageReleaseNotes>
<PackageProjectUrl>https://lab.code-rove.com/gitea/tudor.stanciu/tuitio</PackageProjectUrl> <PackageProjectUrl>https://lab.code-rove.com/gitea/tudor.stanciu/tuitio</PackageProjectUrl>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://lab.code-rove.com/gitea/tudor.stanciu/tuitio</RepositoryUrl> <RepositoryUrl>https://lab.code-rove.com/gitea/tudor.stanciu/tuitio</RepositoryUrl>
<PackageTags>Tuitio wrapper</PackageTags> <RepositoryType>Git</RepositoryType>
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/ReleaseNotes.txt"))</PackageReleaseNotes>
<Version>2.0.0</Version> <Version>2.0.0</Version>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Company>Toodle HomeLab</Company>
<Copyright>Toodle Tuitio</Copyright>
<PackageTags>Tuitio HomeLab CodeRove</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -21,4 +26,10 @@
<ProjectReference Include="..\Tuitio.PublishedLanguage\Tuitio.PublishedLanguage.csproj" /> <ProjectReference Include="..\Tuitio.PublishedLanguage\Tuitio.PublishedLanguage.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Update="logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project> </Project>

BIN
src/Tuitio.Wrapper/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB