1 Star 0 Fork 103

PiaoLinzhi / MCloud

forked from heyuxian / MCloud 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.md 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
heyuxian 提交于 2017-10-14 19:57 . 完善 swagger ui

MCloud - 用户认证中心

简介

mcloud-uia 实现用户统一登录,通过简单的配置即可实现第三方登录。

快速使用

注: 用户认证中心依赖OAuth2 Server,在启动认证中心之前需启动 OAuth2认证服务

启动OAuth Server:

cd mcloud-oauth-server
mvn clean install
mvn spring-boot:run

启动认证中心:

cd mcloud-uia
mvn clean install
mvn spring-boot:run

访问地址: http://localhost:8443/uia/swagger-ui.html

预置用户

  • 用户名:user
  • 密码:123456

通过swagger调用登录接口即可获取 access_token 供其他服务使用.

uaa

access_token

获取 access_token 之后,在其他服务swagger UI 对应位置填入 access_token ,此处以博客服务为例。

首先 ,启动 blog 服务,访问 http://localhost:8081/blog/swagger-ui.html

点击右上角 Authorize 按钮,弹出以下界面:

Swagger UI

access_token 格式:

Bearer access_token

Beareraccess_token 之间有空格分隔, 最后点击 Authorize 按钮,此时即可访问相关博客API

Java
1
https://gitee.com/loverswordsman/mcloud.git
git@gitee.com:loverswordsman/mcloud.git
loverswordsman
mcloud
MCloud
master

搜索帮助