{"id":18699958,"url":"https://github.com/theborakompanioni/thymeleaf-extras-shiro","last_synced_at":"2025-04-12T19:48:01.821Z","repository":{"id":6541328,"uuid":"7782737","full_name":"theborakompanioni/thymeleaf-extras-shiro","owner":"theborakompanioni","description":"A Thymeleaf dialect for Apache Shiro tags.","archived":false,"fork":false,"pushed_at":"2024-01-20T17:56:48.000Z","size":210,"stargazers_count":303,"open_issues_count":2,"forks_count":74,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-12T19:47:43.454Z","etag":null,"topics":["shiro","spring","thymeleaf"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theborakompanioni.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2013-01-23T20:09:16.000Z","updated_at":"2025-02-01T07:22:41.000Z","dependencies_parsed_at":"2024-01-20T15:22:23.345Z","dependency_job_id":"5b41a3cf-785c-4f4f-88c4-717c04ae8e17","html_url":"https://github.com/theborakompanioni/thymeleaf-extras-shiro","commit_stats":{"total_commits":104,"total_committers":10,"mean_commits":10.4,"dds":0.4807692307692307,"last_synced_commit":"64b711a6affd56ab723d32e8952675fe14b7e2d1"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fthymeleaf-extras-shiro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fthymeleaf-extras-shiro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fthymeleaf-extras-shiro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theborakompanioni%2Fthymeleaf-extras-shiro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theborakompanioni","download_url":"https://codeload.github.com/theborakompanioni/thymeleaf-extras-shiro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625497,"owners_count":21135513,"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":["shiro","spring","thymeleaf"],"created_at":"2024-11-07T11:34:59.951Z","updated_at":"2025-04-12T19:48:01.800Z","avatar_url":"https://github.com/theborakompanioni.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/theborakompanioni/thymeleaf-extras-shiro/actions/workflows/build.yml/badge.svg)](https://github.com/theborakompanioni/thymeleaf-extras-shiro/actions/workflows/build.yml)\n[![GitHub Release](https://img.shields.io/github/release/theborakompanioni/thymeleaf-extras-shiro.svg?maxAge=3600)](https://github.com/theborakompanioni/thymeleaf-extras-shiro/releases/latest)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.theborakompanioni/thymeleaf-extras-shiro.svg?maxAge=3600)](http://search.maven.org/#search|ga|1|g%3A%22com.github.theborakompanioni%22%20AND%20a%3A%22thymeleaf-extras-shiro%22)\n[![License](https://img.shields.io/github/license/theborakompanioni/thymeleaf-extras-shiro.svg?maxAge=2592000)](https://github.com/theborakompanioni/thymeleaf-extras-shiro/blob/master/LICENSE)\n\nthymeleaf-extras-shiro\n---\n\nA [Thymeleaf](https://www.thymeleaf.org/) dialect for [Apache Shiro](https://shiro.apache.org) [tags](https://shiro.apache.org/tags).\n\n\n## Download\n\n##### Gradle\n```groovy\nimplementation \"com.github.theborakompanioni:thymeleaf-extras-shiro:${thymeleaf-shiro.version}\"\n```\n\n##### Maven\n```html\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.theborakompanioni\u003c/groupId\u003e\n    \u003cartifactId\u003ethymeleaf-extras-shiro\u003c/artifactId\u003e\n    \u003cversion\u003e${thymeleaf-shiro.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n##### Jar\n[Download](https://search.maven.org/#search|gav|1|g%3A%22com.github.theborakompanioni%22%20AND%20a%3A%22thymeleaf-extras-shiro%22) from Maven Central.\n\n##### Repository\n```shell\ngit clone https://github.com/theborakompanioni/thymeleaf-extras-shiro.git\n```\n\n## Example\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml xmlns:shiro=\"https://www.github.com/theborakompanioni/thymeleaf-extras-shiro\"\u003e\n\n  \u003chead\u003e\n    \u003ctitle\u003ethymeleaf-extras-shiro\u003c/title\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003cp shiro:guest=\"\"\u003ePlease \u003ca href=\"login.html\"\u003elogin\u003c/a\u003e\u003c/p\u003e\n    \u003cp shiro:authenticated=\"\"\u003e\n      Hello, \u003cspan shiro:principal=\"\"\u003e\u003c/span\u003e, how are you today?\n    \u003c/p\u003e\n  \u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n### Tags\n\nThe following examples show how to integrate the tags in your Thymeleaf templates.\nThese are all implementations of the examples given in the [JSP / GSP Tag Library Section](https://shiro.apache.org/web.html#Web-JSP%252FGSPTagLibrary) of the Apache Shiro documentation.\n\nTags can be written in attribute or element notation:\n\n##### Attribute\n```html\n\u003cp shiro:anyTag\u003e\n  Goodbye cruel World!\n\u003c/p\u003e\n```\n\n##### Element\n```html\n\u003cshiro:anyTag\u003e\n  \u003cp\u003eHello World!\u003c/p\u003e\n\u003c/shiro:anyTag\u003e\n```\n\n* * * \n\n#### The `guest` tag\n```html\n\u003cp shiro:guest=\"\"\u003e\n  Please \u003ca href=\"login.html\"\u003eLogin\u003c/a\u003e\n\u003c/p\u003e\n```\n\n#### The `user` tag\n```html\n\u003cp shiro:user=\"\"\u003e\n  Welcome back John! Not John? Click \u003ca href=\"login.html\"\u003ehere\u003ca\u003e to login.\n\u003c/p\u003e\n```\n\n#### The `authenticated` tag\n```html\n\u003ca shiro:authenticated=\"\" href=\"updateAccount.html\"\u003eUpdate your contact information\u003c/a\u003e\n```\n\n#### The `notAuthenticated` tag\n```html\n\u003cp shiro:notAuthenticated=\"\"\u003e\n  Please \u003ca href=\"login.html\"\u003elogin\u003c/a\u003e in order to update your credit card information.\n\u003c/p\u003e\n```\n\n#### The `principal` tag\n```html\n\u003cp\u003eHello, \u003cspan shiro:principal=\"\"\u003e\u003c/span\u003e, how are you today?\u003c/p\u003e\n```\nor\n```html\n\u003cp\u003eHello, \u003cshiro:principal/\u003e, how are you today?\u003c/p\u003e\n```\n\nTyped principal and principal property are also supported.\n\n#### The `hasRole` tag\n```html\n\u003ca shiro:hasRole=\"administrator\" href=\"admin.html\"\u003eAdminister the system\u003c/a\u003e\n```\n\n#### The `lacksRole` tag\n```html\n\u003cp shiro:lacksRole=\"administrator\"\u003e\n  Sorry, you are not allowed to administer the system.\n\u003c/p\u003e\n```\n\n#### The `hasAllRoles` tag\n```html\n\u003cp shiro:hasAllRoles=\"developer, project manager\"\u003e\n  You are a developer and a project manager.\n\u003c/p\u003e\n```\n\n#### The `hasAnyRoles` tag\n```html\n\u003cp shiro:hasAnyRoles=\"developer, project manager, administrator\"\u003e\n  You are a developer, project manager, or administrator.\n\u003c/p\u003e\n```\n\n#### The `hasPermission` tag\n```html\n\u003ca shiro:hasPermission=\"user:create\" href=\"createUser.html\"\u003eCreate a new User\u003c/a\u003e\n```\n\n#### The `lacksPermission` tag\n```html\n\u003cp shiro:lacksPermission=\"user:delete\"\u003e\n  Sorry, you are not allowed to delete user accounts.\n\u003c/p\u003e\n```\n\n#### The `hasAllPermissions` tag\n```html\n\u003cp shiro:hasAllPermissions=\"user:create, user:delete\"\u003e\n  You can create and delete users.\n\u003c/p\u003e\n```\n\n#### The `hasAnyPermissions` tag\n```html\n\u003cp shiro:hasAnyPermissions=\"user:create, user:delete\"\u003e\n  You can create or delete users.\n\u003c/p\u003e\n```\n\n\n## Resources\n- Apache Shiro (Website): https://shiro.apache.org\n- Apache Shiro (GitHub): https://github.com/apache/shiro\n- Thymeleaf (Website): https://www.thymeleaf.org/\n- Thymeleaf (GitHub): https://github.com/thymeleaf/thymeleaf\n\n## License\nThe project is licensed under the Apache License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheborakompanioni%2Fthymeleaf-extras-shiro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheborakompanioni%2Fthymeleaf-extras-shiro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheborakompanioni%2Fthymeleaf-extras-shiro/lists"}