- 新增 PasskeyAuthorizationController 控制器,提供注册与验证通行密钥的接口 - 创建 UserCredential 实体类及对应的 Mapper,用于存储用户凭证信息 - 实现 CredentialRepository 接口,支持通行密钥的查询与管理逻辑 - 新增 PasskeyAuthorizationService 接口及其实现,处理通行密钥的注册和验证流程 - 添加 PasskeyProperties 配置类,读取通行密钥相关配置项 - 引入 ehcache 缓存配置与工具类 CacheService,用于临时存储认证过程中的数据 - 配置 RelyingParty bean,支撑 WebAuthn 认证流程 - 在 pom.xml 中引入 fastjson2、webauthn-server-core 和 ehcache依赖 - 新增 application-dev.yml与 application-prod.yml 配置文件,区分环境变量 - 设置 spring.profiles.active 默认为 dev 环境
123 lines
3.3 KiB
XML
123 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>3.5.7</version>
|
|
<relativePath/> <!-- lookup parent from repository -->
|
|
</parent>
|
|
<groupId>com.kane</groupId>
|
|
<artifactId>Animo</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<name>Animo</name>
|
|
<description>Animo</description>
|
|
<url/>
|
|
<licenses>
|
|
<license/>
|
|
</licenses>
|
|
<developers>
|
|
<developer/>
|
|
</developers>
|
|
<scm>
|
|
<connection/>
|
|
<developerConnection/>
|
|
<tag/>
|
|
<url/>
|
|
</scm>
|
|
<properties>
|
|
<java.version>17</java.version>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-devtools</artifactId>
|
|
<scope>runtime</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
<!-- <artifactId>spring-boot-docker-compose</artifactId>-->
|
|
<!-- <scope>runtime</scope>-->
|
|
<!-- <optional>true</optional>-->
|
|
<!-- </dependency>-->
|
|
<dependency>
|
|
<groupId>com.mysql</groupId>
|
|
<artifactId>mysql-connector-j</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
|
<version>3.5.10.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>cn.dev33</groupId>
|
|
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
|
<version>1.39.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba.fastjson2</groupId>
|
|
<artifactId>fastjson2</artifactId>
|
|
<version>2.0.52</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.yubico</groupId>
|
|
<artifactId>webauthn-server-core</artifactId>
|
|
<version>2.7.0</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<!-- https://mvnrepository.com/artifact/org.ehcache/ehcache -->
|
|
<dependency>
|
|
<groupId>org.ehcache</groupId>
|
|
<artifactId>ehcache</artifactId>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|