N1ql join with another bucket that is password protected

@simonbasle appreciate your help. I get the following error while trying your suggestion:
creds has to be of type array of { user, pass } with code 1070

my implementation is as follow:
val params = N1qlParams.build() .withCredentials(BUCKET1_NAME, BUCKET1_PASS) .withCredentials(BUCKET2_NAME, BUCKET2_PASS) bucket.query(N1qlQuery.simple(MY_STATEMENT, params))

Thanks a lot.
Ron