{"id":19692754,"url":"https://github.com/hhandoko/servicestack.authentication.lightspeed","last_synced_at":"2025-06-10T13:35:44.391Z","repository":{"id":71948204,"uuid":"20787629","full_name":"hhandoko/ServiceStack.Authentication.LightSpeed","owner":"hhandoko","description":"LightSpeed ORM provider for ServiceStack authentication","archived":false,"fork":false,"pushed_at":"2015-01-06T04:22:16.000Z","size":1520,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T00:39:17.525Z","etag":null,"topics":["c-sharp","lightspeed","servicestack","servicestack-authentication"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hhandoko.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-13T00:50:46.000Z","updated_at":"2017-04-03T07:48:39.000Z","dependencies_parsed_at":"2023-02-26T14:45:46.919Z","dependency_job_id":null,"html_url":"https://github.com/hhandoko/ServiceStack.Authentication.LightSpeed","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhandoko%2FServiceStack.Authentication.LightSpeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhandoko%2FServiceStack.Authentication.LightSpeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhandoko%2FServiceStack.Authentication.LightSpeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhandoko%2FServiceStack.Authentication.LightSpeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hhandoko","download_url":"https://codeload.github.com/hhandoko/ServiceStack.Authentication.LightSpeed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhandoko%2FServiceStack.Authentication.LightSpeed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259085460,"owners_count":22803206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","lightspeed","servicestack","servicestack-authentication"],"created_at":"2024-11-11T19:14:19.940Z","updated_at":"2025-06-10T13:35:44.367Z","avatar_url":"https://github.com/hhandoko.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"ServiceStack.Authentication.LightSpeed is a [LightSpeed ORM](http://www.mindscapehq.com/products/lightspeed) provider for ServiceStack authentication.\n\n## Prerequisites and Installation\nThe library does not ship with LightSpeed ORM binaries, and it expects the binaries to be available at the default installation path: `C:\\Program Files (x86)\\Mindscape\\Bin\\`.\n\nIt is currently built for:\n  * .NET 4.5\n  * Mindscape LightSpeed 5\n  * ServiceStack 4\n\nIt is available from NuGet, either via the GUI or running the following command from the Package Manager console:\n\n```\nPM\u003e Install-Package ServiceStack.Authentication.LightSpeed\n```\n\n**Dependencies:**\n\n  * ServiceStack (\u003e= 4.0)\n\n## Configuration\nThe following is an example for ASP.NET web applications. Set the unit of work context and scope in `Global.asax.cs`,\n\n```C#\nauthContext = new LightSpeedContext\u003cDataModelUnitOfWork\u003e;\nauthScope = new PerRequestUnitOfWorkScope\u003cDataModelUnitOfWork\u003e(authContext);\n```\n\nand initialise it as normal via `AppHost.Init()` in `AppHost.cs`.\n\n```C#\ncontainer.Register\u003cIUserAuthRepository\u003e(c =\u003e\n    new LightSpeedUserAuthRepository(c.Resolve\u003cIUnitOfWork\u003e())).ReusedWithin(ReuseScope.Request);\n```\n\nBy default, it will use the standard `JsvStringSerializer` to save complex object (e.g. roles and permissions in UserAuth).\n\nIn order to use other `IStringSerializer`, define it within the custom `UserAuthModelUnitOfWorkFactory`. The following is an example found in the [unit test](/blob/master/tests/ServiceStack.Authentication.LightSpeedTests/LightSpeedAuthProviderReadCompatibilityTest.cs):\n\n```C#\nauthContext =\n    new LightSpeedContext\u003cUserAuthModelUnitOfWork\u003e\n        {\n            ConnectionString = dbConnStr,\n            DataProvider = DataProvider.SQLite3,\n            UnitOfWorkFactory = new UserAuthModelUnitOfWorkFactory(new JsvStringSerializer()),\n            IdentityMethod = IdentityMethod.IdentityColumn\n        };\n```\n\nPlease read the following [ServiceStack release notes](https://github.com/ServiceStack/ServiceStack/blob/081842d11c5dcf304a89f65e4491a9e92718d038/release-notes.md#pluggable-complex-type-serializers) for further information on pluggable complex type serializers.\n\nAlso note the use of `IdentityMethod.IdentityColumn` for identity generation method. Use this option to preserve full compatibility with OrmLite, as by default, LightSpeed will use the `KeyTable` implementation. More information on various LightSpeed identity generation can be found on [this page](http://www.mindscapehq.com/documentation/lightspeed/Controlling-the-Database-Mapping/Identity-Generation).\n\n## Usage\nThe library implements ServiceStack's `IUserAuthRepository` interface (including `IManageRoles` for role management). Thus, the usage shall be no different from the standard `OrmLiteAuthRepository`.\n\n```C#\n...\nvar ormLiteUser = this.OrmLiteRepository.GetUserAuthByUserName(username);\nvar lightspeedUser = this.LightSpeedRepository.GetUserAuthByUserName(username);\n...\n```\n\n```C#\n...\n\nthis.OrmLiteRepository.AssignRoles(ormLiteUser, roles: new Collection\u003cstring\u003e { \"SuperAdmin\" });\nthis.LightSpeedRepository.AssignRoles(lightspeedUser, roles: new Collection\u003cstring\u003e { \"SuperAdmin\" });\n...\n```\n\nPlease note that at this time, role addition and removal is only supported through the repository class. Running collection methods over the UserAuth's `Roles` and `Permissions` properties (e.g. `userAuth.Roles.Add(newRole)`) will not persist the changes.    \n\n## Contributors\nPlease refer to the following [page](/Contributors.md) for a complete list of all contributors.\n\n## Contributing\nPull requests shall be made against `develop` branch, which will be reviewed for merging into the `master` branch.\n\n## Copyright and License\n  * Code and documentation copyright ServiceStack.Authentication.LightSpeed [contributors](/blob/master/Contributors.md).\n  * Code released under [BSD3 license](/blob/master/License.txt).\n  * Documentation released under [Creative Commons license](/blob/master/LicenseDocs.txt).\n\n## TODO\nThe following tasks shall be completed for version 1.0 milestone:\n  * Complete read and write compatibility unit tests\n  * Create repository constructors based on IDbConnection to keep similar signatures with OrmLite ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhhandoko%2Fservicestack.authentication.lightspeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhhandoko%2Fservicestack.authentication.lightspeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhhandoko%2Fservicestack.authentication.lightspeed/lists"}