Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casdoor/shiro-casdoor
Apache Shiro Integration with Casdoor
https://github.com/casdoor/shiro-casdoor
apache auth authentication authorization casdoor integration oauth oidc plugin realm shiro
Last synced: 5 days ago
JSON representation
Apache Shiro Integration with Casdoor
- Host: GitHub
- URL: https://github.com/casdoor/shiro-casdoor
- Owner: casdoor
- License: apache-2.0
- Created: 2022-02-15T14:59:16.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T09:59:38.000Z (over 1 year ago)
- Last Synced: 2024-11-14T06:28:02.796Z (2 months ago)
- Topics: apache, auth, authentication, authorization, casdoor, integration, oauth, oidc, plugin, realm, shiro
- Language: Java
- Homepage: https://shiro.apache.org/integration.html
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shiro-casdoor
[![build](https://github.com/casdoor/shiro-casdoor/actions/workflows/maven-ci.yml/badge.svg)](https://github.com/casdoor/shiro-casdoor/actions/workflows/maven-ci.yml)
[![License](https://img.shields.io/github/license/casdoor/casdoor-spring-boot-starter.svg?style=flat-square&color=blue)](http://www.apache.org/licenses/LICENSE-2.0.txt)
[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/5rPsrAzK7S)This plugin contains a Shiro Realm for Casdoor which will validate Casdoor JWT access tokens.
This plugin provides a Shiro Realm that will authenticate requests with an Authorization: `Bearer ` header.
To use the realm, first [define and configure](https://shiro.apache.org/realm.html#realm-configuration) the `CasdoorShiroRealm`.
The JWT claim information can be retrieved from the current Shiro Subject by casting the principal to `CasdoorUser`:
```java
import org.casbin.casdoor.entity.CasdoorUser;
...
CasdoorUser casdoorUser = (CasdoorUser) SecurityUtils.getSubject().getPrincipal();
```See the examples to help you get started even faster:
- [casdoor-spring-boot-shiro-example](https://github.com/casdoor/casdoor-spring-boot-shiro-example)
We also publish these libraries for Java:
- [casdoor-java-sdk](https://github.com/casdoor/casdoor-java-sdk)
- [casdoor-spring-boot-starter](https://github.com/casdoor/casdoor-spring-boot-starter)