🔥 删除sso-demo 模块,可参考文档单点登录自行整合

This commit is contained in:
lbw committed 2023-01-04 19:41:45 +08:00
1 parent eee4222d54
commit e11b9e6f13
6 files changed
-192

No files matched your search

-69
View File
@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
-->
<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>
<artifactId>pigx-sso-client-demo</artifactId>
<packaging>jar</packaging>
<name>pigx-sso-client-demo</name>
<description>单点登录客户端</description>
<parent>
<groupId>com.pig4cloud</groupId>
<artifactId>pigx-visual</artifactId>
<version>4.6.0</version>
</parent>
<dependencies>
<!-- 安全模块 -->
<dependency>
<groupId>org.springframework.security.oauth.boot</groupId>
<artifactId>spring-security-oauth2-autoconfigure</artifactId>
</dependency>
<!--web 模块-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--undertow容器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -1,39 +0,0 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.sso;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
/**
* @author lengleng
* @date 2018年11月15日17:06:26
* <p>
* 单点登录客户端 1. 启动实例访问:http://localhost:4040/sso1/ 提示登录,然后获取到用户信息 2. 再启动一个实例:
* http://localhost:4041/sso1/ 不需要登录即可获取当前用户信息
*/
@EnableOAuth2Sso
@SpringBootApplication
public class PigxSsoClientDemoApplication {
public static void main(String[] args) {
SpringApplication.run(PigxSsoClientDemoApplication.class, args);
}
}
@@ -1,36 +0,0 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.sso.controller;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author lengleng
* @date 2018/1/27 demo controller
*/
@RestController
public class DemoController {
@GetMapping("/user")
public Authentication user(Authentication authentication) {
return authentication;
}
}
@@ -1,20 +0,0 @@
#server:
# port: 4040
# servlet:
# context-path: /sso1
#
#security:
# oauth2:
# client:
# client-id: pig
# client-secret: pig
# user-authorization-uri: http://localhost:3000/oauth/authorize
# access-token-uri: http://localhost:3000/oauth/token
# scope: server
# resource:
# loadBalanced: true
# token-info-uri: http://localhost:3000/oauth/check_token
#
#spring:
# application:
# name: @artifactId@
@@ -1,27 +0,0 @@
<!DOCTYPE html>
<!--
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
-->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<a href="user">获取登录信息</a>
</body>
</html>
-1
View File
@@ -41,7 +41,6 @@
<module>pigx-pay-platform</module>
<module>pigx-monitor</module>
<module>pigx-mp-platform</module>
<module>pigx-sso-client-demo</module>
<module>pigx-seata-server</module>
<module>pigx-sentinel-dashboard</module>
<module>pigx-xxl-job-admin</module>