DMIdentity.Jwt 1.0.0

dotnet add package DMIdentity.Jwt --version 1.0.0
NuGet\Install-Package DMIdentity.Jwt -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DMIdentity.Jwt" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DMIdentity.Jwt --version 1.0.0
#r "nuget: DMIdentity.Jwt, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DMIdentity.Jwt as a Cake Addin
#addin nuget:?package=DMIdentity.Jwt&version=1.0.0

// Install DMIdentity.Jwt as a Cake Tool
#tool nuget:?package=DMIdentity.Jwt&version=1.0.0

DM Identity Jwt

Resposta ao logar

public class JwtResponse
{
    public bool Authenticated { get; set; }
    public string Created { get; set; }
    public string Expiration { get; set; }
    public string AccessToken { get; set; }
    public string Message { get; set; }
    public string Email { get; set; }
}

##Parametros para Login e Registar

public class UserLogin
{
    [EmailAddress(ErrorMessage = "E-mail inválido.")]
    [MaxLength(60, ErrorMessage = "O email deve conter no máximo 60 caracteres.")]
    [Required(ErrorMessage = "Email deve ser informado.")]
    public string Email { get; set; }

    [MaxLength(20, ErrorMessage = "A senha ultrapassou o tamanho limite.")]
    [MinLength(6, ErrorMessage = "Senha deve conter no mínimo 6 caracteres.")]
    [Required(ErrorMessage = "Senha deve ser informada.")]
    public string Senha { get; set; }
}

public class User
{        
    [EmailAddress(ErrorMessage = "Email invalido")]
    [MaxLength(60, ErrorMessage = "O email deve conter no máximo 60 caracteres")]
    [Required(ErrorMessage = "O email deve ser informado.")]
    public string Email { get; set; }

    [MaxLength(20, ErrorMessage = "A senha ultrapassou o tamanho limite")]
    [MinLength(6, ErrorMessage = "Senha deve conter no mínimo 6 caracteres")]
    [Required(ErrorMessage = "A senha deve ser informada.")]
    public string Senha { get; set; }
    
}

Configuração no projeto principal

    public void ConfigureServices(IServiceCollection services)
    {
        services.ConfigToken(Configuration, builder =>
            builder.UseSqlServer(Configuration.GetConnectionString("SuaStringConexao"), b => b.MigrationsAssembly("NomeSeuProjetoPrincipal")));            

        services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
    }
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.2 is compatible.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 515 9/24/2019

First Version