Applyze.Shared.Authentication 1.0.6.2

Package Description

There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package Applyze.Shared.Authentication -Version 1.0.6.2
dotnet add package Applyze.Shared.Authentication --version 1.0.6.2
<PackageReference Include="Applyze.Shared.Authentication" Version="1.0.6.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Applyze.Shared.Authentication --version 1.0.6.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Applyze.Shared.Authentication

This package includes AspNetCore 2.2 Authentication implementations.


Installation

NuGet Package

You can find NuGet Package and instructions from here

  • Open Package Manager Console and run following command:
Install-Package Applyze.Shared.Authentication
  • Or just add following package reference to .csproj file:
    <PackageReference Include="Applyze.Shared.Authentication" Version="1.0.3" />
  • Finally you should set the base url of tenant once in your application start:
Applyze.Shared.Authentication.Constants.TenantBaseUrl = "https://mycustomdomain.api.applyze.com/tenant/v1/";

Set-Up

  • Go to Dependency Injection builder
  • Add following implementation into IServiceCollection:
services.AddScoped<ITenantService,TenantService>();

Usage

Sample:

  • Add ITenantService type parameter to your class constructor, keep it and use it:
//...
using Applyze.Shared.Authentication.Services;
//...

public class YourClass()
{
    private readonly ITenantService _service;
    public YourClass(ITenantService service) //<-- Constructor
    {
        _service = service;
    }

    public async Task<IActionResult> YourAction(string apiKey)
    {
        //...
        var result = await service.AuthenticateApiKeyAsync(apiKey);  // < --- Just use like here.
        //...
    }
}

Applyze.Shared.Authentication

This package includes AspNetCore 2.2 Authentication implementations.


Installation

NuGet Package

You can find NuGet Package and instructions from here

  • Open Package Manager Console and run following command:
Install-Package Applyze.Shared.Authentication
  • Or just add following package reference to .csproj file:
    <PackageReference Include="Applyze.Shared.Authentication" Version="1.0.3" />
  • Finally you should set the base url of tenant once in your application start:
Applyze.Shared.Authentication.Constants.TenantBaseUrl = "https://mycustomdomain.api.applyze.com/tenant/v1/";

Set-Up

  • Go to Dependency Injection builder
  • Add following implementation into IServiceCollection:
services.AddScoped<ITenantService,TenantService>();

Usage

Sample:

  • Add ITenantService type parameter to your class constructor, keep it and use it:
//...
using Applyze.Shared.Authentication.Services;
//...

public class YourClass()
{
    private readonly ITenantService _service;
    public YourClass(ITenantService service) //<-- Constructor
    {
        _service = service;
    }

    public async Task<IActionResult> YourAction(string apiKey)
    {
        //...
        var result = await service.AuthenticateApiKeyAsync(apiKey);  // < --- Just use like here.
        //...
    }
}

Release Notes

Released

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0-pre1 41 11/18/2019
1.0.7-pre1 53 10/24/2019
1.0.6.2 78 7/24/2019
1.0.6.1 73 7/24/2019