{"id":15622748,"url":"https://github.com/nbaztec/shiro-trie","last_synced_at":"2025-04-12T22:28:57.816Z","repository":{"id":144136124,"uuid":"132010034","full_name":"nbaztec/shiro-trie","owner":"nbaztec","description":"Allows working with Apache Shiro style permissions for .NET core applications","archived":false,"fork":false,"pushed_at":"2019-06-07T06:44:02.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T16:38:26.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nbaztec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-03T14:49:30.000Z","updated_at":"2021-05-08T04:54:23.000Z","dependencies_parsed_at":"2023-04-27T14:25:48.049Z","dependency_job_id":null,"html_url":"https://github.com/nbaztec/shiro-trie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaztec%2Fshiro-trie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaztec%2Fshiro-trie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaztec%2Fshiro-trie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaztec%2Fshiro-trie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nbaztec","download_url":"https://codeload.github.com/nbaztec/shiro-trie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639332,"owners_count":21137825,"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":[],"created_at":"2024-10-03T09:55:06.810Z","updated_at":"2025-04-12T22:28:57.789Z","avatar_url":"https://github.com/nbaztec.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nA simple .NET Core library to manage [Apache Shiro](http://shiro.apache.org/permissions.html)-styled permissions.\n\n\nInspired by the [shiro-trie](https://www.npmjs.com/package/shiro-trie) npm package \nand [Apache Shiro](https://shiro.apache.org/permissions.html) styled permissions.\n\n# Installation\n\n```\n$ dotnet add package ShiroTrie\n```\n\n # Example\n\n ```c#\nvar permissions = new[]\n{\n    \"file:read\",\n    \"file:write\",\n    \"directory:delete,create\",\n    \"image:png,jpeg:read,write\",\n    \"audio:mp3,ogg:high,low:sample\",\n    \"user:*\",\n    \"mail\",\n    \"tty\"\n};\n\n// add permissions to trie\nvar trie = new PermissionTrie();\ntrie.Add(scopes);\n\n\n// test permissions\nvar checks = new[]\n{\n    \"file:read\",\n    \"file:create\",\n    \"file:update\",\n    \"file:delete\",\n    \"printer\",\n    \"scanner:read\",\n    \"image:png:read\",\n    \"audio:mp3:high:sample\",\n    \"audio:mp3:high:sample:once\",\n    \"user:delete\",\n    \"user:*\",\n    \"user:create\",\n    \"mail\",\n    \"mail:delete\",\n    \"mail:delete:once\",\n    \"bash-tty\",\n};\n\nforeach (var check in checks)\n{\n    Console.WriteLine(\"{0} = {1}\", check, trie.Check(check));\n}\n\n\n/*\n\u003e Output:\nfile:read = True\nfile:create = False\nfile:update = False\nfile:delete = False\nprinter = False\nscanner:read = False\nimage:png:read = True\naudio:mp3:high:sample = True\naudio:mp3:high:sample:once = True\nuser:delete = True\nuser:* = True\nuser:create = True\nmail = True\nmail:delete = True\nmail:delete:once = True\nbash-tty = False\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbaztec%2Fshiro-trie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnbaztec%2Fshiro-trie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbaztec%2Fshiro-trie/lists"}