![](https://img.kancloud.cn/3d/7b/3d7bf0378d808ad1a1a38a9ed638b2f3_760x433.png) ## 认证中心接口地址 http://127.0.0.1:8000/api-auth/doc.html ![](https://img.kancloud.cn/37/48/37487cfd00bcc569d9222c9bab34a9c2_1701x493.png) ``` ## 接口地址 http://127.0.0.1:8000/api-auth/doc.html ``` ## 客户端模式 ![](https://img.kancloud.cn/30/e9/30e9e6537c5af35b0388c02bd69bdb22_1920x803.png) ## 密码模式 ![](https://img.kancloud.cn/86/1d/861d40a358dbfa865d3b99dc8d30e8ed_1917x780.png) ## 系统流程 ![](https://img.kancloud.cn/77/b4/77b4ca5acd43732cb2809e7f1216fd6d_1217x652.png) ## 授权码模式 * 获取授权码 (http://127.0.0.1:8000/api-auth/oauth/authorize?client_id=owen&redirect_uri=http://127.0.0.1:9997/dashboard/login&state=abc&scope=app&response_type=code) * 跳转统一登录页面,登录成功获取授权码 ![](https://img.kancloud.cn/56/e2/56e2409077b22173ea9102f2fab47384_1918x461.png) * 用授权码换token ![](https://img.kancloud.cn/30/ba/30bab4f598230a47349bedf8b425dd9f_1711x512.png) ## 单点登录登出案例 * 登录http://127.0.0.1:9997 * 跳转到网关路由到统一认证中心 * 登录成功回调http://127.0.0.1:9997 ![](https://img.kancloud.cn/9f/cf/9fcf50e6f976a338abc4d79793716fb9_1920x1028.gif)