20 Star 30 Fork 14

Qicz / AuthServer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

#AuthServer

参考oauth2.0, 基于jfinal2.0,jfinal-ext2-1.0,jfinal-ext-3.1.4.

实现了三个功能点

  • authorize: 此阶段主要获取code
  • access_token: 此阶段获取accessToken;
  • refresh_token此阶段更新accessToken;

####authorize 请求参数说明

  • response_type: 必须为code;
  • scope: 为系统定义的范围;
  • state : 为系统定义的state;
  • client_id : 为系统分配的client_id,具体规则自定义;

####authorize 返回参数说明

  • code : 系统下方的code;
  • state : 请求参数中的state;
  • scope : 请求参数中的scope;

#####access_token 参数说明

  • response_type : 必须为 token;
  • grant_type : 必须为 access_token;
  • code : authorize下发的code;
  • client_id : 系统分配的client_id;
  • client_secret : 系统分配的client_secret;
  • username : 用户名;
  • password : 用户密码;
  • scope: 为系统定义的范围;
  • state : 为系统定义的state;

#####access_token 返回参数说明

  • access_token : token值;
  • expires_in : 过期时间;
  • refresh_token : 下次用于刷新token的refresh_token;
  • scope: 为系统定义的范围;
  • state : 为系统定义的state;

#####refresh_token 参数说明

  • response_type : 必须为token;
  • grant_type : 必须为refresh_token;
  • refresh_token : access_token下发的refresh_token;
  • client_id : 系统分配的client_id;
  • client_secret : 系统分配的client_secret;
  • username : 用户名;
  • password : 用户密码;
  • scope: 为系统定义的范围;
  • state : 为系统定义的state;

#####refresh_token 返回参数说明

与access_token返回相同

错误返回参数

  • error : 错误信息;
  • error_description : 错误描述;
  • scope: 为系统定义的范围;
  • state : 为系统定义的state;
The MIT License (MIT) Copyright (c) 2015 BruceZCQ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

参考oauth2.0, 基于jfinal2.0,jfinal-ext2-1.0,jfinal-ext-3.1.4. 实现了三个功能点 authorize: 此阶段主要获取code access_token: 此阶段获取accessToken; refresh_token此阶段更新accessToken; 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/jobszcq/AuthServer.git
git@gitee.com:jobszcq/AuthServer.git
jobszcq
AuthServer
AuthServer
master

搜索帮助