Current Packages
"JwtOption": {
"SaveToken": true, // true or false
"ValidateIssuer": false, // true or false
"ValidateAudience": false, // true or false
"ValidateLifetime": true, // true or false
"Issuer": null, // string
"Audience": null, // string
"SigningKey": "You should be write here your security key!" // string
}
builder.Services.AddJwtProducer(builder.Configuration);
app.UseAuthentication();
app.UseAuthorization();
[Route("api/[controller]")]
[ApiController]
public class AuthController : ControllerBase
{
private readonly IJwtBuilder _jwtBuilder;
public AuthController(IJwtBuilder jwtBuilder)
{
_jwtBuilder = jwtBuilder;
}
}