Giter Club home page Giter Club logo

spring-cloud-gateway-oauth2's People

Contributors

it-honghui avatar mykg-honghui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spring-cloud-gateway-oauth2's Issues

教学视频

您好 大佬 ,能不能整个教学视频,上b站。谢谢

通过nginx访问404

大哥 按照你上面的写法通过网关访问auth服务是可以了 但是怎么通过nginx代理的网关访问auth完成授权码过程 我通过nginx访问的id+ auth/oauth/authorize?client_id=social-security-card&response_type=code&scope=all&redirect_uri=http://www.baidu.com 跳转到登录页,登陆之后就报404了

使用密码模式获取JWT令牌直接401

按照readme.md中得操作,尝试通过密码获取jwt令牌,请求格式如下

POST http://localhost:9201/oauth/token
Content-Type: application/json

{
  "grant_type": "password",
  "client_id": "client-app",
  "client_secret": "123456",
  "username": "admin",
  "password": "123456"
}

直接响应401,请问是哪里需要做额外配置吗?

HTTP/1.1 401 Unauthorized
transfer-encoding: chunked
WWW-Authenticate: Basic realm="oauth2/client"
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Date: Thu, 10 Feb 2022 05:31:26 GMT
Referrer-Policy: no-referrer

{
  "timestamp": "2022-02-10 05:31:26",
  "status": 401,
  "error": "Unauthorized",
  "message": "",
  "path": "/oauth/token"
}

经过网关访问授权码模式是不行的。

使用授码模式登录时,先访问地址获取授权码:http://localhost:9201/oauth/authorize?response_type=code&client_id=client-app-2&redirect_uri=https://www.baidu.com

但是很多时候,我们都需要通过网关访问后面的服务,你可以试试经过网关访问,因为spring cloud gateway处理数据时会丢掉session信息,经过网关,登陆后无法转向/oauth/authorize的。
http://localhost:9999/auth/oauth/authorize?response_type=code&client_id=client-app-2&redirect_uri=https://www.baidu.com

不经过网关,你网关后面的服务的ip,端口什么全都暴露的。防止cloud gateway,理论上所有外部调用API应该都要走gateway,内部feign互调才不需要走gateway。

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.