namespace DigitalData.Auth.Claims
{
///
/// Provides helpers for building cookie names used in the DigitalData.Auth ecosystem.
///
public static class CookieNames
{
private const string ReceiverSuffix = "SignFLOWReceiver.";
///
/// Builds the cookie name for an envelope receiver token.
///
/// The base cookie name configured in AuthApiParams.
/// The unique envelope receiver key.
/// A cookie name in the format {defaultCookieName}SignFLOWReceiver.{key}.
public static string GetEnvelopeReceiverCookieName(string defaultCookieName, string key)
=> defaultCookieName + ReceiverSuffix + key;
///
/// Builds the cookie name for an envelope receiver token. This overload assumes a default cookie name of "AuthToken".
///
/// The unique envelope receiver key.
/// A cookie name in the format {defaultCookieName}SignFLOWReceiver.{key}.
public static string GetEnvelopeReceiverCookieName(string key)
=> "AuthToken" + ReceiverSuffix + key;
}
}