Initial commit
This commit is contained in:
16
MealPlan.Api/Services/ITokenService.cs
Normal file
16
MealPlan.Api/Services/ITokenService.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Security.Claims;
|
||||
using MealPlan.Api.Models;
|
||||
|
||||
namespace MealPlan.Api.Services;
|
||||
|
||||
public interface ITokenService
|
||||
{
|
||||
/// <summary>Creates a signed JWT access token for the given user.</summary>
|
||||
string CreateAccessToken(ApplicationUser user);
|
||||
|
||||
/// <summary>Generates and persists a new refresh token for the given user id.</summary>
|
||||
RefreshToken CreateRefreshToken(string userId);
|
||||
|
||||
/// <summary>Access-token lifetime in seconds (exposed to clients for scheduling refresh).</summary>
|
||||
int AccessTokenLifetimeSeconds { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user