Askerlve / Oauth2 Shiro Jwt
use oauth2, shiro and spring specrity to make an ums system
Stars: ✭ 29
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Oauth2 Shiro Jwt
Springall
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc
Stars: ✭ 22,375 (+77055.17%)
Mutual labels: springboot, spring-security, shiro
Springcloud
基于SpringCloud2.1的微服务开发脚手架,整合了spring-security-oauth2、nacos、feign、sentinel、springcloud-gateway等。服务治理方面引入elasticsearch、skywalking、springboot-admin、zipkin等,让项目开发快速进入业务开发,而不需过多时间花费在架构搭建上。持续更新中
Stars: ✭ 6,997 (+24027.59%)
Mutual labels: springboot, oauth2, spring-security
Sureness
A simple and efficient open-source security framework that focus on protection of restful api.
Stars: ✭ 254 (+775.86%)
Mutual labels: springboot, spring-security, shiro
Api Boot
“ ApiBoot”是为接口服务而生的,基于“ SpringBoot”完成扩展和自动配置,内部封装了一系列的开箱即用Starters。
Stars: ✭ 460 (+1486.21%)
Mutual labels: springboot, oauth2, spring-security
Spring Boot Demo
spring boot demo 是一个Spring Boot、Spring Cloud的项目示例,根据市场主流的后端技术,共集成了30+个demo,未来将持续更新。该项目包含helloworld(快速入门)、web(ssh项目快速搭建)、aop(切面编程)、data-redis(redis缓存)、quartz(集群任务实现)、shiro(权限管理)、oauth2(四种认证模式)、shign(接口参数防篡改重放)、encoder(用户密码设计)、actuator(服务监控)、cloud-config(配置中心)、cloud-gateway(服务网关)等模块
Stars: ✭ 323 (+1013.79%)
Mutual labels: oauth2, spring-security, shiro
Example Oauth2 Server
Example for OAuth 2 Server for Authlib.
Stars: ✭ 499 (+1620.69%)
Mutual labels: oauth2, oauth2-server
Doorkeeper
Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.
Stars: ✭ 4,917 (+16855.17%)
Mutual labels: oauth2, oauth2-server
Springboot Shiro
使用SpringBoot与shiro实现基于数据库的细粒度动态权限管理系统实例
Stars: ✭ 564 (+1844.83%)
Mutual labels: springboot, shiro
Auth Service
spring security + oauth2.0 + jwt
Stars: ✭ 622 (+2044.83%)
Mutual labels: oauth2, spring-security
Rude Java
Java Practice Projects. 以Java语言为主的各种项目实践,涵盖各个业务、各个功能,并附上高质量文章讲解,其中一些甚至可以单开一个仓库。让你再也不用寻找各种框架demo、项目脚手架。
Stars: ✭ 583 (+1910.34%)
Mutual labels: springboot, spring-security
Web Framework For Java
A seed project with spring boot for AngularJS, AngularJs Material, Thymeleaf, RESTful API, MySQL and admin panel based on AdminLTE.
Stars: ✭ 29 (+0%)
Mutual labels: oauth2, oauth2-server
Spring Boot React Oauth2 Social Login Demo
Spring Boot React OAuth2 Social Login with Google, Facebook, and Github
Stars: ✭ 676 (+2231.03%)
Mutual labels: oauth2, spring-security
Fw Cloud Framework
基于springcloud全家桶开发分布式框架(支持oauth2认证授权、SSO登录、统一下单、微信公众号服务、Shardingdbc分库分表、常见服务监控、链路监控、异步日志、redis缓存等功能),实现基于Vue全家桶等前后端分离项目工程
Stars: ✭ 717 (+2372.41%)
Mutual labels: springboot, oauth2
Jeecg Boot
「企业级低代码平台」前后端分离架构SpringBoot 2.x,SpringCloud,Ant Design&Vue,Mybatis-plus,Shiro,JWT。强大的代码生成器让前后端代码一键生成,无需写任何代码! 引领新的开发模式OnlineCoding->代码生成->手工MERGE,帮助Java项目解决70%重复工作,让开发更关注业务,既能快速提高效率,帮助公司节省成本,同时又不失灵活性。
Stars: ✭ 26,432 (+91044.83%)
Mutual labels: springboot, shiro
Taroco
整合Nacos、Spring Cloud Alibaba,提供了一系列starter组件, 同时提供服务治理、服务监控、OAuth2权限认证,支持服务降级/熔断、服务权重,前端采用vue+elementUI+webpack,可以很好的解决转向Spring Cloud的一系列问题。
Stars: ✭ 545 (+1779.31%)
Mutual labels: oauth2, spring-security
Spring Boot In Action
Spring Boot 系列实战合集
Stars: ✭ 4,153 (+14220.69%)
Mutual labels: springboot, spring-security
Angular Springboot Rest Jwt
Springboot, Angular and JWT security - Example Project based on Northwind Order Processing
Stars: ✭ 603 (+1979.31%)
Mutual labels: springboot, spring-security
Webpersonal
WebPersonal 是基于 Spring Boot + Vue Admin Template 搭建的个人网站,采用Docker容器化部署。包括个人简历、权限管理、相册等功能,持续更新,您的 Star⭐,就是我最大的动力(●'◡'●)
Stars: ✭ 28 (-3.45%)
Mutual labels: springboot, spring-security
Xinguan
SpringBoot+Vue+Element-UI (新冠-物资管理系统) 纯前后端分离项目, 抗疫相关物料的管理系统,领用、派发记录,库存查询统计。寂寞消遣之作~, 项目预览地址:https://www.zykhome.club 武汉加油
Stars: ✭ 359 (+1137.93%)
Mutual labels: springboot, shiro
Go Api Boilerplate
Go Server/API boilerplate using best practices DDD CQRS ES gRPC
Stars: ✭ 373 (+1186.21%)
Mutual labels: oauth2, oauth2-server
接口说明,支持两种方式,两套接口
1.使用JWT生成Token,使用shiro实现鉴权
2.使用oauth2生成token,spring security实现鉴权
使用JWT生成Token,使用shiro实现鉴权
UMS返回参数说明
名称 | 类型 | 说明 |
---|---|---|
type | int | 请求状态(0:失败;1:成功) |
messageCode | int | 详情请移步错误码page |
message | String | 提示信息 |
result | Object | 结果集 |
获取token
POST /shiro/auth/token
输入参数 | 必须 | 类型 | 中文描述 |
---|---|---|---|
applicationKey | yes | String | 需要登录的项目key |
userName | yes | String | 用户名 |
password | yes | String | 密码 |
返回Result | 类型 | 中文描述 |
---|---|---|
token | String | 使用JWT生成的Token |
请求示例
curl -X POST "http://localhost:8030/auth/token" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"applicationKey\": \"urule\", \"password\": \"123456\", \"userName\": \"askerlve\"}"
返回示例
{
"type": 1,
"messageCode": 200,
"message": "操作成功!",
"result": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBsaWNhdGlvbktleSI6InVydWxlIiwiaXNzIjoiY21zIiwidXNlck5hbWUiOiJhc2tlcmx2ZSIsImV4cCI6MTUyNDYyNjQzMSwiaWF0IjoxNTI0NjI2MTMxfQ.q7HP26HAUVw7X7MF2Kjgqu49ky5DWJJAPR4xHAfuZ2Q"
}
}
获取权限列表
GET /shiro/auth/list/permission
输入参数 | 必须 | 类型 | 中文描述 |
---|---|---|---|
Authorization | yes | String | 认证Token |
返回Result | 类型 | 中文描述 |
---|---|---|
id | int | 资源id |
parentId | int | 父节点id |
applicationId | int | 所属系统id |
name | String | 资源名称 |
code | String | 资源code |
url | String | 资源地址 |
description | String | 资源描述 |
type | int | 资源类型(0:系统;1:菜单;2:API) |
icon | String | 图标 |
order | int | 排序 |
status | int | 状态(0:禁用 1:启用 -3:垃圾桶 -4:删除) |
createTime | Date | 创建时间 |
createUserId | int | 创建人id |
updateTime | Date | 更新时间 |
updateUserId | int | 更新者id |
请求示例
curl -X GET "http://localhost:8030/auth/list/permission" -H "accept: */*" -H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBsaWNhdGlvbktleSI6InVydWxlIiwiaXNzIjoiY21zIiwidXNlck5hbWUiOiJhc2tlcmx2ZSIsImV4cCI6MTUyNDYyNjQzMSwiaWF0IjoxNTI0NjI2MTMxfQ.q7HP26HAUVw7X7MF2Kjgqu49ky5DWJJAPR4xHAfuZ2Q"
返回示例
{
"type": 1,
"messageCode": 200,
"message": "操作成功!",
"result": [
{
"id": 1,
"parentId": null,
"applicationId": 1,
"name": "决策系统",
"code": "DSQ",
"url": "/urule",
"description": "决策系统",
"type": 0,
"icon": null,
"order": 2,
"status": null,
"createTime": "2018-04-20 17:14:34",
"createUserId": 1,
"updateTime": "2018-04-20 17:14:34",
"updateUserId": 1
},
{
"id": 4,
"parentId": null,
"applicationId": 1,
"name": "用户管理",
"code": "userManager",
"url": "/urule/user",
"description": "决策系统用户管理",
"type": 1,
"icon": null,
"order": 0,
"status": null,
"createTime": "2018-04-24 18:39:51",
"createUserId": 1,
"updateTime": "2018-04-24 18:39:51",
"updateUserId": 1
}
]
}
判断当前用户是否有权限
POST /shiro/auth/judge/permission
输入参数 | 必须 | 类型 | 中文描述 |
---|---|---|---|
applicationKey | yes | String | 需要登录的项目key |
Authorization | yes | String | 认证Token |
urlAddress | yes | String | 需要鉴权的地址 |
返回Result | 类型 | 中文描述 |
---|---|---|
isAllowed | boolean | true:有权限;false:无权限 |
请求示例
curl -X POST "http://localhost:8030/auth/judge/permission" -H "accept: */*" -H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBsaWNhdGlvbktleSI6InVydWxlIiwiaXNzIjoiY21zIiwidXNlck5hbWUiOiJhc2tlcmx2ZSIsImV4cCI6MTUyNDYzOTMzNSwiaWF0IjoxNTI0NjM5MDM1fQ.zA2J0GvIQGGp4tszhf515u-pFYRDwuU8zXuGK9AGo6I" -H "Content-Type: application/json" -d "{ \"urlAddress\": \"/urule\"}"
返回示例
{
"type": 1,
"messageCode": 200,
"message": "操作成功!",
"result": {
"isAllowed": true
}
}
使用oauth2生成Token,使用sping security实现鉴权
UMS返回参数说明
名称 | 类型 | 说明 |
---|---|---|
type | int | 请求状态(0:失败;1:成功) |
messageCode | int | 详情请移步错误码page |
message | String | 提示信息 |
result | Object | 结果集 |
获取token
POST /oauth/login
输入参数 | 必须 | 数据类型 | 参数类型 | 中文描述 |
---|---|---|---|---|
Authorization | yes | String | header | Basic + " " + (客户端用户名 + ":" + 客户端密码)进行base64编码 |
Content-Type | yes | String | header | 请求入参方式,只支持application/x-www-form-urlencoded或者form-data |
username | yes | String | body | 用户名 |
password | yes | String | body | 密码 |
返回Result | 数据类型 | 中文描述 |
---|---|---|
additionalInformation | json对象 | 扩展对象 |
additionalInformation.jti | string | token唯一标识 |
expiration | long | 过期时间戳 |
expired | boolean | 是否过期 |
expiresIn | int | 多少秒以后过期 |
refreshToken | json对象 | 刷新token信息 |
refreshToken.expiration | long | 过期时间戳 |
refreshToken.value | string | refreshToken值 |
scope | string数组 | 授权作用域 |
tokenType | string | token类型 |
value | string | access_token值 |
请求示例
curl -X POST \
http://localhost:8030/oauth/login \
-H 'Authorization: Basic dXJ1bGU6dXJ1bGU=' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'username=askerlve&password=123456'
返回示例
{
"message": "操作成功!",
"messageCode": 200,
"result": {
"additionalInformation": {
"jti": "a5bf41d7-3913-440f-8936-7b81485abd57"
},
"expiration": 1525423241889,
"expired": false,
"expiresIn": 599,
"refreshToken": {
"expiration": 1526718641889,
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjY3MTg2NDEsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiY2M3MGViODItMmI2My00NzcyLWE1ZTgtZjM2ZWFkNjM3YjBlIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXSwiYXRpIjoiYTViZjQxZDctMzkxMy00NDBmLTg5MzYtN2I4MTQ4NWFiZDU3In0.InynNTN3WBSaX8XD1QevKTFiQx65l_8lKFYt-HldOvI"
},
"scope": [
"all"
],
"tokenType": "bearer",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjU0MjMyNDEsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiYTViZjQxZDctMzkxMy00NDBmLTg5MzYtN2I4MTQ4NWFiZDU3IiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXX0.ugnpz0GvN0l42zdk9tOd7MvS3PvVIm4ZNe0f7bWrxh0"
},
"type": 1
}
oauth2方式刷新token
POST /oauth/token
输入参数 | 必须 | 数据类型 | 参数类型 | 中文描述 |
---|---|---|---|---|
Authorization | yes | String | header | Basic + " " + (客户端用户名 + ":" + 客户端密码)进行base64编码 |
Content-Type | yes | String | header | 请求入参方式,只支持application/x-www-form-urlencoded或者form-data |
grant_type | yes | String | body | 操作类型 |
refresh_token | yes | String | body | 刷新token的值 |
返回Result | 数据类型 | 中文描述 |
---|---|---|
access_token | String | access_token值 |
jti | string | token唯一标识 |
expiresIn | int | 多少秒以后过期 |
refreshToken | string | 刷新token信息 |
scope | string | 授权作用域 |
tokenType | string | token类型 |
请求示例
curl -X POST \
http://localhost:8030/oauth/token \
-H 'Authorization: Basic dXJ1bGU6dXJ1bGU=' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjY3MTg2NDEsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiY2M3MGViODItMmI2My00NzcyLWE1ZTgtZjM2ZWFkNjM3YjBlIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXSwiYXRpIjoiYTViZjQxZDctMzkxMy00NDBmLTg5MzYtN2I4MTQ4NWFiZDU3In0.InynNTN3WBSaX8XD1QevKTFiQx65l_8lKFYt-HldOvI'
返回示例
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjU0MjQ0MTQsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiYjAyODYzZmYtOTkwYy00OTNjLWFmZTktZjA4ZTBiYTgxZWU1IiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXX0.Xat3d42TDTZpglFR7kL4wVwnA6JjHSP8HS1x_GESoE8",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjY3MTg2NDEsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiY2M3MGViODItMmI2My00NzcyLWE1ZTgtZjM2ZWFkNjM3YjBlIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXSwiYXRpIjoiYjAyODYzZmYtOTkwYy00OTNjLWFmZTktZjA4ZTBiYTgxZWU1In0.--hu5-nLW_zcUVydksreihQV30aetLlxJsXwcYQXveA",
"expires_in": 599,
"scope": "all",
"jti": "b02863ff-990c-493c-afe9-f08e0ba81ee5"
}
自定义方式刷新token
POST /oauth/auth/refresh
输入参数 | 必须 | 数据类型 | 参数类型 | 中文描述 |
---|---|---|---|---|
Authorization | yes | String | header | Basic + " " + (客户端用户名 + ":" + 客户端密码)进行base64编码 |
refresh_token | yes | String | body | 刷新token的值 |
返回Result | 数据类型 | 中文描述 |
---|---|---|
access_token | String | access_token值 |
jti | string | token唯一标识 |
expiresIn | int | 多少秒以后过期 |
refreshToken | string | 刷新token信息 |
scope | string | 授权作用域 |
tokenType | string | token类型 |
请求示例
curl -X POST "http://localhost:8030/oauth/auth/refresh"
-H "Authorization: Basic dXJ1bGU6dXJ1bGU="
-H "Content-Type: application/json"
-d "{ \"refreshToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1Mjc2NzU4OTEsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiNjBlM2YxOGQtNWFhMS00NjcwLWFiMGYtMGUwODc5ZWE5YjhiIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXSwiYXRpIjoiYTA0YTM1MzYtMGU3ZS00MDU1LTlmY2MtZjIzZTQ2NmU3Yzc3In0.xB7ciV8syq79VHLYOEM9R365J7VSPXdL0b0oPog1T4c\"}"
返回示例
{
"type": 1,
"messageCode": 200,
"message": "操作成功!",
"result": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjYzODA1MDksInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiNTM0ZDVhZDItMGQwMS00YjI5LTk2NTctYzU1YjlmZjIwNTBhIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXX0.l8NrCs8C0YLkD3qC797JEtED3_PMD689wzj30DvujWs",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1Mjc2NzU4OTEsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiNjBlM2YxOGQtNWFhMS00NjcwLWFiMGYtMGUwODc5ZWE5YjhiIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXSwiYXRpIjoiNTM0ZDVhZDItMGQwMS00YjI5LTk2NTctYzU1YjlmZjIwNTBhIn0.PT0Zkg1ftH1CSXGbkUp02iZRr68iqfmkI2xIHBzPtM8",
"expires_in": 599,
"scope": "all",
"jti": "534d5ad2-0d01-4b29-9657-c55b9ff2050a"
}
}
登出
GET /oauth/logout
输入参数 | 必须 | 数据类型 | 参数类型 | 中文描述 |
---|---|---|---|---|
Authorization | yes | String | header | Bearer + " " + token |
返回Result | 数据类型 | 中文描述 |
---|---|---|
none | none | none |
请求示例
curl -X GET \
http://localhost:8030/oauth/logout \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjU2NjE1MzEsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiN2UyOWQ2YzQtYjQ4MC00YzI3LWIyY2EtN2YzZDgwY2E3N2RiIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXX0.Esj5eovax8H3uK9df8CID12ia9YkUPMWIgpa7zl7-gQ'
返回示例
{
"message": "操作成功!",
"messageCode": 200,
"type": 1
}
获取权限列表
POST /oauth/auth/list/permission
输入参数 | 必须 | 数据类型 | 参数类型 | 中文描述 |
---|---|---|---|---|
Authorization | yes | String | header | Bearer + " " + token |
applicationKey | yes | String | body | 要拉取的项目key |
返回Result | 类型 | 中文描述 |
---|---|---|
id | int | 资源id |
parentId | int | 父节点id |
applicationId | int | 所属系统id |
name | String | 资源名称 |
code | String | 资源code |
url | String | 资源地址 |
description | String | 资源描述 |
type | int | 资源类型(0:系统;1:菜单;2:API) |
icon | String | 图标 |
order | int | 排序 |
status | int | 状态(0:禁用 1:启用 -3:垃圾桶 -4:删除) |
createTime | Date | 创建时间 |
createUserId | int | 创建人id |
updateTime | Date | 更新时间 |
updateUserId | int | 更新者id |
请求示例
curl -X POST "http://localhost:8030/oauth/auth/list/permission" \
-H "accept: */*" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjU2NjQxNTgsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiMTUxNWUzM2MtYjdhNS00OWRjLTg2MWItMTdjZDc1Y2YwMWUxIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXX0.cyGqSJDThvvlqokRdHSl1fMtraVAJm5O3XGSjDiKMtk" \
-H "Content-Type: application/json" \
-d "{ \"applicationKey\": \"urule\"}"
返回示例
{
"type": 1,
"messageCode": 200,
"message": "操作成功!",
"result": [
{
"id": 1,
"parentId": 0,
"applicationId": 1,
"name": "决策系统",
"code": "DSQ",
"url": "/urule",
"description": "决策系统",
"type": 0,
"icon": "tbd",
"order": 2,
"status": 1,
"createTime": "2018-04-20 17:14:34",
"createUserId": 1,
"updateTime": "2018-04-20 17:14:34",
"updateUserId": 1
},
{
"id": 4,
"parentId": 1,
"applicationId": 1,
"name": "用户管理",
"code": "userManager",
"url": "/urule/user",
"description": "决策系统用户管理",
"type": 1,
"icon": "tbd",
"order": 0,
"status": 1,
"createTime": "2018-04-24 18:39:51",
"createUserId": 1,
"updateTime": "2018-04-24 18:39:51",
"updateUserId": 1
},
{
"id": 5,
"parentId": 4,
"applicationId": 1,
"name": "用户新增",
"code": "userAdd",
"url": "/urule/user/add",
"description": "决策系统用户新增",
"type": 2,
"icon": "tbd",
"order": 0,
"status": 1,
"createTime": "2018-04-24 18:46:15",
"createUserId": 1,
"updateTime": "2018-04-24 18:46:15",
"updateUserId": 1
}
]
}
判断当前用户是否有权限
POST /oauth/auth/judge/permission
输入参数 | 必须 | 数据类型 | 参数类型 | 中文描述 |
---|---|---|---|---|
Authorization | yes | String | header | Bearer + " " + token |
applicationKey | yes | String | body | 要判断的url所属项目key |
urlAddress | yes | String | body | 要判断的url |
返回Result | 类型 | 中文描述 |
---|---|---|
isAllowed | boolean | true:有权限;false:无权限 |
请求示例
curl -X POST "http://localhost:8030/oauth/auth/judge/permission" \
-H "accept: */*"
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjU2NjQxNTgsInVzZXJfbmFtZSI6ImFza2VybHZlIiwianRpIjoiMTUxNWUzM2MtYjdhNS00OWRjLTg2MWItMTdjZDc1Y2YwMWUxIiwiY2xpZW50X2lkIjoidXJ1bGUiLCJzY29wZSI6WyJhbGwiXX0.cyGqSJDThvvlqokRdHSl1fMtraVAJm5O3XGSjDiKMtk"
-H "Content-Type: application/json"
-d "{ \"applicationKey\": \"urule\", \"urlAddress\": \"/urule\"}"
返回示例
{
"type": 1,
"messageCode": 200,
"message": "操作成功!",
"result": {
"isAllowed": true
}
}
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].