23 lines
668 B
C#
23 lines
668 B
C#
// <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>
|
|
/// Identify who the requesting user is.
|
|
/// </summary>
|
|
public interface IIdentityProvider
|
|
{
|
|
/// <summary>
|
|
/// Get the user id of the authorised agent.
|
|
/// </summary>
|
|
/// <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();
|
|
}
|