<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>cn.itlym</groupId>
        <artifactId>shoulder-parent</artifactId>
        <version>1.2.1</version><!-- shoulder-version -->
        <relativePath>../../../shoulder-parent/pom.xml</relativePath>
    </parent>

    <artifactId>shoulder-security</artifactId>
    <name>${project.artifactId}</name>
    <url>https://doc.itlym.cn</url>
    <description>
        Shoulder 基础模块，基于 Spring Security + Spring Boot Web的安全模块，除了提供用户认证、授权、会话管理等基础功能，还允许轻松更换认证模式，如
        Session / Token（JWT） 模式切换。
    </description>

    <dependencies>

        <dependency>
            <groupId>cn.itlym</groupId>
            <artifactId>shoulder-core</artifactId>
        </dependency>

        <!-- spring-security 项目必备，包含 spring-security-config、web 两个基础模块 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <!-- web项目相关依赖 -->
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- oauth2 授权服务器相关依赖 deprecated TODO 废弃与 spring security oauth 项目相关的类，改为替代品 -->
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
            <optional>true</optional>
        </dependency>

        <!--Spring Security OAuth通过提供了自己的JWT支持spring-security-jwt。
            Spring Security依靠Nimbus来提供JWT支持。-->
        <!--<dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-jwt</artifactId>
            <version>1.1.1.RELEASE</version>
            <optional>true</optional>
        </dependency>-->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-oauth2-authorization-server</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- oauth2 资源服务器相关依赖 -->
        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-oauth2-resource-server</artifactId>-->
        <!--            <optional>true</optional>-->
        <!--        </dependency>-->
        <!-- oauth2 客户端 相关依赖 -->
        <!--<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-client</artifactId>
        </dependency>-->

    </dependencies>


    <build>
        <plugins>
            <!-- compiler settings -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <!-- attach source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

            <!-- javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <!-- deploy -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>

            <!-- unit test settings when mvn test -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

        </plugins>
    </build>

</project>
