pig学习
  1. 资源服务器
pig学习
  • pig获取token
    • 额外学习
      • 返回树形部门集合
      • 返回树形菜单集合
      • 获取用户信息
      • 获取指定用户全部信息
      • 获取当前用户全部信息
      • 判断用户是否存在
      • 根据部门id,查询对应的用户 id 集合
      • /admin/user/page
      • /admin/user/info
      • 返回当前用户的树形菜单集合
      • auth/token/page
      • /admin/user
      • 新增部门
    • v3.5+ 密码模式获取token
      POST
    • v3.5+ 获取验证码code
      POST
    • v3.5+ 客户端模式获取token
      POST
    • v3.5+ 短信模式获取token
      POST
    • v3.5+ 授权码模式获取token
      POST
    • v3.5+ 刷新token
      POST
    • v3.5 校验令牌
      GET
    • v3.5+ 发送手机验证码
      GET
    • 删除日志[带token 请求接口演示]
      DELETE
  • pig-学习-oauth2逻辑
    • 授权服务器
      • v1.0+ 密码模式获取token
      • v1.0+ 刷新token
      • v1.0 校验令牌
      • v1.0+ 授权码模式获取code
      • v1.0+ 授权码模式获取token
      • v1.0+ 获取授权用户信息(根据token)
    • 资源服务器
      • v1.0+ 访问permit接口
        POST
      • v1.0+ 访问authen接口
        POST
      • v1.0+ 访问authen基于默认注解接口
        POST
      • v1.0+ 访问authen基于自定义注解接口
        POST
    • 第三方客户端
      • v1.0+ 根据code获取token
  • pig-学习-cloud
    • feign学习
      • /token/test/body
      • 3001/token/test/body
    • 用户模块
      • 用户注册
      • 添加用户
      • 删除用户信息
      • 更新个人信息
      • 分页查询用户
      • 获取指定用户名的用户全部信息
      • 获取当前用户全部信息,包括权限
      • 通过ID查询用户信息
      • 判断用户是否存在
    • 注册登录
      • 密码模式获取token
      • 短信验证码模式获取token
      • 获取短信验证码
      • 获取验证码图片
    • 部门管理
      • 新增部门
      • 修改部门
      • 删除部门
      • 返回树形部门集合
      • 返回去除某部门及其子级部门树形部门集合
      • 通过ID查询部门
      • 返回角色的部门集合
    • 菜单管理
      • 新增菜单
      • 修改菜单
      • 删除菜单
      • 返回树形菜单集合
      • 通过ID查询菜单
      • 返回当前用户的树形菜单集合
      • 返回角色的菜单集合
    • 角色管理
      • 新增角色
      • 修改角色
      • 删除角色
      • 分页查询角色信息
      • 获取角色列表
      • 通过ID查询角色
      • 修改角色绑定的权限
    • 字典管理
      • 字典
        • 新增字典
        • 修改字典
        • 删除字典
        • 分页查询字典列表
        • 通过ID查询字典
      • 字典项
        • 新增字典项
        • 修改字典项
        • 删除字典项
        • 分页查询某个字典的字典项
        • 通过ID查询字典项
      • 通过字典标识查找字典项
  1. 资源服务器

v1.0+ 访问authen接口

开发中
POST
http://127.0.0.1:8081/authen/index

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:8081/authen/index'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{
    "code": 0,
    "msg": "身份已认证,访问成功",
    "data": {
        "authorities": [
            {
                "authority": "SCOPE_server"
            }
        ],
        "details": {
            "remoteAddress": "127.0.0.1",
            "sessionId": null
        },
        "authenticated": true,
        "principal": {
            "name": "qc",
            "attributes": {
                "active": true,
                "sub": "qc",
                "aud": [
                    "qingchen"
                ],
                "license": "https://pig4cloud.com",
                "nbf": "2022-09-24T06:59:51Z",
                "clientId": "qingchen",
                "user_info": {
                    "password": null,
                    "username": "qc",
                    "authorities": [
                        {
                            "authority": "ROLE_write"
                        }
                    ],
                    "accountNonExpired": true,
                    "accountNonLocked": true,
                    "credentialsNonExpired": true,
                    "enabled": true
                },
                "scope": [
                    "server"
                ],
                "iss": "https://pig4cloud.com",
                "exp": "2022-09-24T07:59:51Z",
                "iat": "2022-09-24T06:59:51Z",
                "jti": "2b58897e-313f-45db-a5f5-cbe112ce26e6",
                "client_id": "qingchen",
                "token_type": "Bearer"
            },
            "authorities": [
                {
                    "authority": "SCOPE_server"
                }
            ],
            "claims": {
                "active": true,
                "sub": "qc",
                "aud": [
                    "qingchen"
                ],
                "license": "https://pig4cloud.com",
                "nbf": "2022-09-24T06:59:51Z",
                "clientId": "qingchen",
                "user_info": {
                    "password": null,
                    "username": "qc",
                    "authorities": [
                        {
                            "authority": "ROLE_write"
                        }
                    ],
                    "accountNonExpired": true,
                    "accountNonLocked": true,
                    "credentialsNonExpired": true,
                    "enabled": true
                },
                "scope": [
                    "server"
                ],
                "iss": "https://pig4cloud.com",
                "exp": "2022-09-24T07:59:51Z",
                "iat": "2022-09-24T06:59:51Z",
                "jti": "2b58897e-313f-45db-a5f5-cbe112ce26e6",
                "client_id": "qingchen",
                "token_type": "Bearer"
            },
            "scope": "[server]",
            "id": "2b58897e-313f-45db-a5f5-cbe112ce26e6",
            "active": true,
            "subject": "qc",
            "scopes": [
                "server"
            ],
            "tokenType": "Bearer",
            "expiresAt": "2022-09-24T07:59:51Z",
            "issuedAt": "2022-09-24T06:59:51Z",
            "audience": [
                "qingchen"
            ],
            "issuer": "https://pig4cloud.com",
            "notBefore": "2022-09-24T06:59:51Z",
            "username": null,
            "clientId": "qingchen"
        },
        "credentials": {
            "tokenValue": "qingchen::qc::e512f75a-75e7-4889-b025-1217b3fe7bc3",
            "issuedAt": "2022-09-24T06:59:51Z",
            "expiresAt": "2022-09-24T07:59:51Z",
            "tokenType": {
                "value": "Bearer"
            },
            "scopes": []
        },
        "token": {
            "tokenValue": "qingchen::qc::e512f75a-75e7-4889-b025-1217b3fe7bc3",
            "issuedAt": "2022-09-24T06:59:51Z",
            "expiresAt": "2022-09-24T07:59:51Z",
            "tokenType": {
                "value": "Bearer"
            },
            "scopes": []
        },
        "tokenAttributes": {
            "active": true,
            "sub": "qc",
            "aud": [
                "qingchen"
            ],
            "license": "https://pig4cloud.com",
            "nbf": "2022-09-24T06:59:51Z",
            "clientId": "qingchen",
            "user_info": {
                "password": null,
                "username": "qc",
                "authorities": [
                    {
                        "authority": "ROLE_write"
                    }
                ],
                "accountNonExpired": true,
                "accountNonLocked": true,
                "credentialsNonExpired": true,
                "enabled": true
            },
            "scope": [
                "server"
            ],
            "iss": "https://pig4cloud.com",
            "exp": "2022-09-24T07:59:51Z",
            "iat": "2022-09-24T06:59:51Z",
            "jti": "2b58897e-313f-45db-a5f5-cbe112ce26e6",
            "client_id": "qingchen",
            "token_type": "Bearer"
        },
        "name": "qc"
    }
}
修改于 2022-11-10 12:28:14
上一页
v1.0+ 访问permit接口
下一页
v1.0+ 访问authen基于默认注解接口
Built with