readme.md

    spring-auth-server-demo

    It's a demo project for learning spring-auth-server.

    This project consists of four sub-projects which described below.

    How to run this demo?

    Run with Docker (Postgres)

    How to run this demo? Follows the steps below:

    • Ensure Docker is running;
    • Create the Docker storage
    docker volume create idp_local
    • Create DB instance in Docker
    docker run -d --platform linux/amd64 -e POSTGRES_HOST_AUTH_METHOD=trust -v idp_local:/var/lib/postgresql/data --name postgres-idp-db -p 5432:5432 -d postgres:12-alpine
    • Start the Auth. Server
    cd .\auth-server-demo\ && mvn install && mvn spring-boot:run
    • Start the IDP. Server
    cd .\idp-server-demo\ && mvn install && mvn spring-boot:run
    • Start the Resource Server
    cd .\resource-server-demo\ && mvn install && mvn spring-boot:run
    • Todo: start the angular
    cd .\angular-client-demo\ && npm run start

    Run without Docker (SQL Server Express)

    Ensure the SQL Server (express) is running.

    • Start the Auth. Server
    cd .\auth-server-demo\ && mvn install && mvn spring-boot:run
    • Start the IDP. Server
    cd .\idp-server-demo\ && mvn install && mvn spring-boot:run
    • Start the Resource Server
    cd .\resource-server-demo\ && mvn install && mvn spring-boot:run
    • Todo: start the angular
    cd .\angular-client-demo\ && npm run start

    Mapping table of ports

    Port Application
    9000 Auth. server
    8080 IDP server
    8090 Resource server
    TBD Angular client

    auth-server-demo

    Auth. server is a project built on Spring Authorization Server, which only focus on creating token and validating tokens.

    This project embeds the learnings through the following documents:

    To be read?

    Dependencies:

    • Java 17;
    • Spring Boot 3.0;
      • Spring Boot JPA;
      • Spring Boot Web;
    • Postgres 12;
    • Spring Auth Server;

    idp-server-demo

    Identity Provider Server. This server will handle the user management, role assignment, etc.

    Dependencies:

    • Java 17;
    • Spring Boot 3.0;
      • Spring Boot JPA;
      • Spring Boot Web;
    • Postgres 12;
    • Spring Security OAuth2 Client;

    resource-server-demo

    Resource server is a server which exposing the API for usages.

    Dependencies:

    • Java 17;
    • Spring Boot 3.0;
      • Spring Boot JPA;
      • Spring Boot Web;
    • Postgres 12;
    • Resource Server;

    angular-client-demo

    An angular client which consume that resources.

    Dependencies:

    • Angular 14;
    • Typescript 4.6.2;

    项目简介

    A demo for spring-auth-server demo

    发行版本

    当前项目没有发行版本

    贡献者 2

    alvachien @alvachien
    A Alva Chien @Alva Chien

    开发语言

    • Java 56.4 %
    • HTML 37.1 %
    • TypeScript 4.9 %
    • JavaScript 1.2 %
    • CSS 0.4 %