17 lines
556 B
C#
17 lines
556 B
C#
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; }
|
|
}
|