mirror of
https://github.com/Shchoholiev/shopping-assistant-api.git
synced 2025-04-04 16:49:36 +00:00
20 lines
897 B
C#
20 lines
897 B
C#
using ShoppingAssistantApi.Application.IServices.Identity;
|
|
using ShoppingAssistantApi.Application.Models.Identity;
|
|
|
|
namespace ShoppingAssistantApi.Api.Mutations;
|
|
|
|
[ExtendObjectType(OperationTypeNames.Mutation)]
|
|
public class AccessMutation
|
|
{
|
|
public Task<TokensModel> LoginAsync(AccessUserModel login, CancellationToken cancellationToken,
|
|
[Service] IUserManager userManager)
|
|
=> userManager.LoginAsync(login, cancellationToken);
|
|
|
|
public Task<TokensModel> AccessGuestAsync(AccessGuestModel guest, CancellationToken cancellationToken,
|
|
[Service] IUserManager userManager)
|
|
=> userManager.AccessGuestAsync(guest, cancellationToken);
|
|
|
|
public Task<TokensModel> RefreshAccessTokenAsync(TokensModel model, CancellationToken cancellationToken,
|
|
[Service] IUserManager userManager)
|
|
=> userManager.RefreshAccessTokenAsync(model, cancellationToken);
|
|
} |