# oauth2-learning **Repository Path**: TheFreeOne/oauth2-learning ## Basic Information - **Project Name**: oauth2-learning - **Description**: 1234156789453 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-15 - **Last Updated**: 2024-12-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # oauth2-learning #### 介绍 原博客 https://blog.csdn.net/qq_34021712/article/details/80510774 1、首先访问客户端http://localhost:9080/oauth-client/getCode 会重定向到服务端让你输入账号密码授权 2、输入用户名进行登录并授权; 3、如果登录成功,服务端会重定向到客户端,即之前客户端提供的地址http://localhost:9080/oauth-client/callbackCode?code=98872aeb79889bc27be46da76a204aa3,并带着auth code过去; 4、方法内部拿到code之后 会调用服务端获取access_token 然后重定向到客户端的获取用户信息方法 5、获取用户信息方法内调用服务端 并传过去 access_token 获取用户名,然后展示到页面