This commit is contained in:
Paul Schneider 2026-05-30 19:34:22 +01:00
commit e24208e77b
32 changed files with 96 additions and 94 deletions

View file

@ -61,7 +61,7 @@ namespace Yavsc.Services
// TODO: Handle the socket here.
// Find receivers: others in the chat room
// send them the flow
var buffer = new byte[Constants.WebSocketsMaxBufLen];
var buffer = new byte[YavscConstants.WebSocketsMaxBufLen];
var sBuffer = new ArraySegment<byte>(buffer);
_logger.LogInformation("Receiving bytes...");
@ -109,7 +109,7 @@ namespace Yavsc.Services
{
_logger.LogInformation("try and receive new bytes");
buffer = new byte[Constants.WebSocketsMaxBufLen];
buffer = new byte[YavscConstants.WebSocketsMaxBufLen];
received = await liveHandler.Socket.ReceiveAsync(sBuffer, liveHandler.TokenSource.Token);
_logger.LogInformation($"Received bytes : {received.Count}");

View file

@ -43,7 +43,7 @@ namespace Yavsc.Services
claimAdds.Remove("profile");
claimAdds.Add(JwtClaimTypes.Name);
claimAdds.Add(JwtClaimTypes.Email);
claimAdds.Add(Constants.RoleClaimType);
claimAdds.Add(YavscConstants.RoleClaimType);
}
if (claimAdds.Contains(JwtClaimTypes.Name))
@ -52,12 +52,12 @@ namespace Yavsc.Services
if (claimAdds.Contains(JwtClaimTypes.Email))
claims.Add(new Claim(JwtClaimTypes.Email, user.Email));
if (claimAdds.Contains(Constants.RoleClaimType))
if (claimAdds.Contains(YavscConstants.RoleClaimType))
{
var roles = await this._userManager.GetRolesAsync(user);
if (roles.Count()>0)
{
claims.AddRange(roles.Select(r => new Claim(Constants.RoleClaimType, r)));
claims.AddRange(roles.Select(r => new Claim(YavscConstants.RoleClaimType, r)));
}
}
return claims;