ResourceServer如何动态获取client_id?

时间:2019-05-21 11:36:37

标签: java spring-security-oauth2

RemoteTokenServices是否只有两种硬编码方式来获取和设置以下代码中的client_id

如果我有多个应用程序,如何设置client_id

RemoteTokenServices remoteTokenServices = new RemoteTokenServices();
remoteTokenServices.setClientId("client");
remoteTokenServices.setCheckTokenEndpointUrl("https://security-service/oauth/check_token");
remoteTokenServices.setClientSecret("password");

application.yml中:

security:
  oauth2:
    resource:
      clientId: gateway
      clientSecret: gateway
      token-info-uri: /oauth/check_token

0 个答案:

没有答案