GithubHelp home page GithubHelp logo

zhoufn / oauth2-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jobmission/oauth2-client

0.0 0.0 0.0 2.26 MB

基于spring boot2 Oauth2 Client sso 单点登录

License: MIT License

Java 93.43% HTML 6.57%

oauth2-client's Introduction

基于spring boot2 sso Oauth2 Client JWT

启动前修改application.properties中的相关参数

当client和server在一台主机时,请用域名访问,否则cookies会相互覆盖,影响测试,以下配置仅供参考

  • hosts文件
127.0.0.1 client.sso.com
127.0.0.1 server.sso.com
  • nginx配置
server {
        server_name client.sso.com;
        listen 80;
        listen [::]:80;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header REMOTE-HOST $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


        index index.html;

        location / {
                proxy_pass http://localhost:10480/;
        }
}

server {
        server_name server.sso.com;
        listen 80;
        listen [::]:80;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header REMOTE-HOST $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


        index index.html;

        location / {
                proxy_pass http://localhost:10380/;
        }
}

oauth2-client's People

Contributors

jobmission avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.