1
0
mirror of https://github.com/bitwarden/server synced 2025-12-06 00:03:34 +00:00
Files
server/src/Core/NotificationHub/PushRegistrationData.cs
Ben Bryant 20d3911b80 [PM-22380] Enable NRT for some Core project files (#5912)
* Enable NRT for Core/Jobs files

* Enable NRT for Core/HostedServices files

* Enable NRT for Core/Exceptions files

* Enable NRT for Core/NotificationHub files

---------

Co-authored-by: Bernd Schoolmann <mail@quexten.com>
2025-06-06 13:59:57 +02:00

34 lines
765 B
C#

namespace Bit.Core.NotificationHub;
#nullable enable
public record struct WebPushRegistrationData
{
public string Endpoint { get; init; }
public string P256dh { get; init; }
public string Auth { get; init; }
}
public record class PushRegistrationData
{
public string? Token { get; set; }
public WebPushRegistrationData? WebPush { get; set; }
public PushRegistrationData(string? token)
{
Token = token;
}
public PushRegistrationData(string Endpoint, string P256dh, string Auth) : this(new WebPushRegistrationData
{
Endpoint = Endpoint,
P256dh = P256dh,
Auth = Auth
})
{ }
public PushRegistrationData(WebPushRegistrationData webPush)
{
WebPush = webPush;
}
}