GSMClients.Web.Core
1.0.8
dotnet add package GSMClients.Web.Core --version 1.0.8
NuGet\Install-Package GSMClients.Web.Core -Version 1.0.8
<PackageReference Include="GSMClients.Web.Core" Version="1.0.8" />
<PackageVersion Include="GSMClients.Web.Core" Version="1.0.8" />
<PackageReference Include="GSMClients.Web.Core" />
paket add GSMClients.Web.Core --version 1.0.8
#r "nuget: GSMClients.Web.Core, 1.0.8"
#:package GSMClients.Web.Core@1.0.8
#addin nuget:?package=GSMClients.Web.Core&version=1.0.8
#tool nuget:?package=GSMClients.Web.Core&version=1.0.8
GSMClients.Web.Core ✨
Global Session Manager ( GSM ) Client library for .NET Core Web Applications. Provides easy integration with GSM Server for:
Features 🎉
- Session Managment 🔐 : SSO :-
Single Active Session (SSA)Ensures only one active session per user across apps.Single Active User Per Device (SAUPD)Restricts multiple logins from same device.
- Push Notifications 🔔 : Real-Time alerts instantly to connected clients
- Scheduled Triggers ⏰ : Automates periodic tasks like session cleanup and Notifications.
Installation 🛠️
Install via NuGet:
dotnet add package GSMClients.Web.Core
Steps 💡
There are two simple steps to follow:
1. GSM Configuration :-
In your Login Controller, add the following lines to retrieve the GSM Token:
var gsmData = await GSMClient.InitializeAsync(
loggedUserId: "", // Logged User Id,
baseUrl : "", // Update your GSM URL,
clientId : "", // Update your Client Id,
clientSecret: "", // Update your Client Secret,
sessionId : Guid.NewGuid().ToString(),
sessionIp : HttpContext.Connection.RemoteIpAddress?.ToString() ?? ""
);
// ✅ You will receive the connection details in the gsmData variable. Simply pass the same gsmData to your view page to establish the connection.
2. GSM Initializtion :-
Add JS Libraries in View Layout Pages.
<script src="~/_content/GSMClients.Web.Core/signalr-7.0.5.min.js"></script>
<script src="~/_content/GSMClients.Web.Core/GSM-client-1.0.0.min.js"></script>
/**
* ✨ After receiving the gsmData from the Controller, trigger this JS function.
*/
async function gsmConnector(gsmData) {
const gsmClient = new GSMClient({
apiUrl : gsmData.BaseUrl,
token : gsmData.Token,
userId : gsmData.UserId,
sessionId: gsmData.SessionId,
sessionIp: gsmData.SessionIp,
onRegisterSuccess: () => window.location.href = "/Home", // ✅ Add your Home Page / Login success redirection.
onForceLogout: () => window.location.href = "/Logout" // 🚫 Add the Logout Page / trigger the Logout Logic.
});
await gsmClient.connect();
/* If you have multiple layouts, trigger this function from each layout,
and replace the`onRegisterSuccess: () => window.location.href = "/Home"`
line with `onRegisterSuccess: () => console.log("GSM successfully registered")`.
Check the Browser Console!
Happy coding! ✨🎉
*/
}
Using GSM Services 🚀:-
After configuring GSM, now you can trigger broadcasts for real-time messages or data, such as push notifications.
Service 1: Send message to specific user :-
var resUser = await GSMClients.Web.Core.GSMService.BroadcastToUserAsync(
baseUrl : "", // GSM Url
token : "", // Generated token
userId : "", // receiver login Id
message : "", // message
ignoreCertErrors: true // ✅ for UAT - SSL exception
);
Service 2 : Send Message to all user :-
var resGroup = await GSMClients.Web.Core.GSMService.BroadcastToGroupAsync(
baseUrl : "",
token : "",
message : "",
ignoreCertErrors: true // ✅ for UAT - SSL exception
);
Package Contents 📦
GSMClient.cs(C# helper class)GSMService.cs(C# service class)GSM-client-1.0.0.min.js(JavaScript client)signalr-7.0.5.min.js(SignalR library)
Requirements ✅
.NET 6.0 or 8.0
ASP.NET Core Web App
We hope this is exactly what you were looking for! Let me know if you have any other requests. Thank you.. 😊
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.