Introducing new features.: support client_secret_header & client_secret_post

This commit is contained in:
lbw 2023-03-17 16:44:49 +08:00
parent 0126b6f0d4
commit 907eec1801

View File

@ -95,7 +95,11 @@ public class PigRemoteRegisteredClientRepository implements RegisteredClientRepo
RegisteredClient.Builder builder = RegisteredClient.withId(clientDetails.getClientId())
.clientId(clientDetails.getClientId())
.clientSecret(SecurityConstants.NOOP + clientDetails.getClientSecret())
.clientAuthenticationMethod(ClientAuthenticationMethod.CLIENT_SECRET_BASIC);
.clientAuthenticationMethod(ClientAuthenticationMethod.CLIENT_SECRET_POST)
.clientAuthenticationMethods(clientAuthenticationMethods -> {
clientAuthenticationMethods.add(ClientAuthenticationMethod.CLIENT_SECRET_BASIC);
clientAuthenticationMethods.add(ClientAuthenticationMethod.CLIENT_SECRET_POST);
});
// 授权模式
Optional.ofNullable(clientDetails.getAuthorizedGrantTypes())