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