using e_suite.API.Common.models;
using e_suite.Database.Audit;
using eSuite.Core.Miscellaneous;
namespace eSuite.API.SingleSignOn;
///
/// Used to create and remove cookies used by the application
///
public interface ICookieManager
{
///
/// Creates a session cookie containing the users JWT Tokwn
///
///
///
///
Task CreateSessionCookie(HttpResponse response, LoginResponse loginResponse);
///
/// Removes the session cookie.
///
///
///
Task DeleteSessionCookie(HttpResponse response);
///
/// Create a single use cookie used for linking a profile to an sso identity.
///
///
///
///
///
///
Task CreateProfileLinkCookie(HttpResponse response, AuditUserDetails auditUserDetails, GeneralIdRef id, CancellationToken cancellationToken);
///
/// Create a single use cookie used for linking a profile to an sso identity.
///
///
///
///
///
///
Task CreateNewUserLinkCookie(HttpResponse response, AuditUserDetails auditUserDetails, GeneralIdRef id, CancellationToken cancellationToken);
///
/// Looks up the value of the single use cookie and converts it to a user for further processing
///
///
///
///
Task GetUserIdFromLinkCookie(HttpRequest request, CancellationToken cancellationToken);
///
/// Deletes the single use cookie
///
///
///
Task DeleteLinkCookie(HttpResponse response);
///
/// Finds the current SSO Provider from the SsoId cookie, this cookie will remain in the browser between sessions
///
///
///
Task GetSsoIdFromSsoIdCookie(HttpRequest request);
///
/// Create the SsoId cookie containing the provider ID, to help shorten the login process when using SSO
///
///
///
///
Task CreateSsoIdCookie(HttpResponse response, long ssoId);
///
/// Removes the SsoId cookie
///
///
///
Task DeleteSsoIdCookie(HttpResponse response);
}