31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using Galaeth.Services.Dtos;
|
|
|
|
namespace Galaeth.Services.Interfaces;
|
|
|
|
/// <summary>
|
|
/// Provide methods to authenticate new sessions.
|
|
/// </summary>
|
|
public interface IAuthenticationService
|
|
{
|
|
/// <summary>
|
|
/// Authenticate a user.
|
|
/// </summary>
|
|
/// <param name="request">Instance of <see cref="AuthenticateUserDto"/>.</param>
|
|
/// <returns>Instance of <see cref="AccessTokensDto"/>.</returns>
|
|
Task<AccessTokensDto> AuthenticateUser(AuthenticateUserDto request);
|
|
|
|
/// <summary>
|
|
/// Authenticate a user with a refresh token.
|
|
/// </summary>
|
|
/// <param name="request">Instance of <see cref="RefreshAuthenticationDto"/>.</param>
|
|
/// <returns>Instance of <see cref="AccessTokensDto"/>.</returns>
|
|
Task<AccessTokensDto> AuthenticateUser(RefreshAuthenticationDto request);
|
|
|
|
/// <summary>
|
|
/// Change user (requesting)'s password. Old password must be provided.
|
|
/// This action will remove all refresh tokens and generate a new token pair.
|
|
/// </summary>
|
|
/// <param name="request">Instance of <see cref="ChangePasswordDto"/>.</param>
|
|
Task<AccessTokensDto> ChangeUserPassword(ChangePasswordDto request);
|
|
}
|