astral-api/Astral.Services/Interfaces/IIdentityProvider.cs

24 lines
668 B
C#
Raw Normal View History

2024-12-11 21:36:30 +01:00
// <copyright file="IIdentityProvider.cs" company="alveus.dev">
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
// </copyright>
namespace Astral.Services.Interfaces;
/// <summary>
2024-12-14 18:48:03 +01:00
/// Identify who the requesting user is.
2024-12-11 21:36:30 +01:00
/// </summary>
public interface IIdentityProvider
{
/// <summary>
2024-12-14 18:48:03 +01:00
/// Get the user id of the authorised agent.
2024-12-11 21:36:30 +01:00
/// </summary>
2024-12-14 18:48:03 +01:00
/// <returns>Guid representing the user id, or empty guid if none.</returns>
Guid GetUserId();
/// <summary>
/// Get the username of the authorised agent.
/// </summary>
/// <returns>Username, or null if none.</returns>
string GetUserName();
2024-12-11 21:36:30 +01:00
}