@@ -369,6 +369,28 @@ def change_secret(client_id, new_secret, old_secret = nil)
369369 "#{ type_info ( :client , :path ) } /#{ Addressable ::URI . encode ( client_id ) } /secret" , req , headers ) )
370370 end
371371
372+ # Change client jwt trust configuration.
373+ # * For a client to change its jwt client trust, the token in @auth_header must contain
374+ # "client.trust" scope.
375+ # * For an admin to set a client secret, the token in @auth_header must contain
376+ # "uaa.admin" scope.
377+ # @see https://docs.cloudfoundry.org/api/uaa/index.html#change-client-jwt
378+ # @param [String] client_id the {Scim} +id+ attribute of the client
379+ # @param [String] jwks_uri the URI to token endpoint
380+ # @param [String] jwks the JSON Web Key Set
381+ # @param [String] kid If changeMode is DELETE provide the id of key
382+ # @param [String] changeMode Change mode, possible is ADD, UPDATE, DELETE
383+ # @return [Hash] success message from server
384+ def change_clientjwt ( client_id , jwks_uri = nil , jwks = nil , kid = nil , changeMode = nil )
385+ req = { "client_id" => client_id }
386+ req [ "jwks_uri" ] = jwks_uri if jwks_uri
387+ req [ "jwks" ] = jwks if jwks
388+ req [ "kid" ] = kid if kid
389+ req [ "changeMode" ] = changeMode if changeMode
390+ json_parse_reply ( @key_style , *json_put ( @target ,
391+ "#{ type_info ( :client , :path ) } /#{ Addressable ::URI . encode ( client_id ) } /clientjwt" , req , headers ) )
392+ end
393+
372394 def unlock_user ( user_id )
373395 req = { "locked" => false }
374396 json_parse_reply ( @key_style , *json_patch ( @target ,
0 commit comments