Skip to content

youkol/shiro-support

Repository files navigation

shiro-support

Maven Central Sonatype Nexus (Snapshots) License

A simple Shiro extension library.

1. Add Supports

  • Spring cache-based implementations of Shiro's cache interfaces.
  • A simple username/password/captcha authentication token to support the most widely-used authentication mechanism.
  • Add JWT Support
  • Custom implementation inherited ModularRealmAuthenticator, and store the last AuthenticationException for multi realm. Fix when use multi realm, lost the AuthenticationException info.

2. Usage

<dependencies>
  ...
  <dependency>
    <groupId>com.youkol.support.shiro</groupId>
    <artifactId>shiro-support</artifactId>
    <version>${shiro-support.version}</version>
  </dependency>
  ...
</dependencies>

For spring boot autoconfigure

<dependencies>
  ...
  <!-- Import the nimbus can auto configuration JwtTokenService bean  -->
  <dependency>
    <groupId>com.nimbusds</groupId>
    <artifactId>nimbus-jose-jwt</artifactId>
    <version>${nimbus-jose-jwt.version}</version>
  </dependency>
  <dependency>
    <groupId>com.youkol.support.shiro</groupId>
    <artifactId>shiro-support-spring-boot-starter</artifactId>
    <version>${shiro-support.version}</version>
  </dependency>
  ...
</dependencies>