LogoPAX ADMIN PRO

开始之前

创建或修改client

可以使用ApiFox或者Postman传入以下格式json创建或修改client

{
  "accessTokenValidity": 3600,
  "additionalInformation": "",
  "authorities": "[ADMIN]",
  "authorizedGrantTypes": "client_credentials,refresh_token,password,authorization_code",
  "autoapprove": true,
  "clientId": "pax-admin-pro",
  "clientSecret": "$2a$10$2QfDePbYmqPAK71lf8GlKOKYs8kL7Xcv9VMsbR8hsOCnx3/PCVDtm",
  "refreshTokenValidity": 3600,
  "resourceIds": "",
  "scope": "user_info",
  "webServerRedirectUri": "http://192.168.10.68:9000/pax-admin-pro,http://192.168.10.69:9000/pax-admin-pro"
}

将开发的访问地址添加到 webServerRedirectUri 中,以英文逗号隔开, 同时,开发的ip和端口需要在 auth serviceapplication.yml 中配置允许跨域访问

security:
  #跨域配置
  cors:
    configs:
      - path: /**
        origins:
          - http://192.168.10.68:9000
          - http://192.168.10.69:9000
          ...

add-client

On this page