✨ Introducing new features. support client_secrt_post client_secrt_header

This commit is contained in:
lbw committed 2023-03-18 15:17:49 +08:00
1 parent 60f8bd160d
commit 57c1cad799
1 file changed
+4 -2
@@ -96,8 +96,10 @@ public class PigxRemoteRegisteredClientRepository implements RegisteredClientRep
RegisteredClient.Builder builder = RegisteredClient.withId(clientDetails.getClientId())
.clientId(clientDetails.getClientId())
.clientSecret(SecurityConstants.NOOP + clientDetails.getClientSecret())
.clientAuthenticationMethod(ClientAuthenticationMethod.CLIENT_SECRET_BASIC);
.clientAuthenticationMethods(clientAuthenticationMethods -> {
clientAuthenticationMethods.add(ClientAuthenticationMethod.CLIENT_SECRET_BASIC);
clientAuthenticationMethods.add(ClientAuthenticationMethod.CLIENT_SECRET_POST);
});
// 授权模式
Arrays.stream(clientDetails.getAuthorizedGrantTypes())
.forEach(grant -> builder.authorizationGrantType(new AuthorizationGrantType(grant)));