package auth.sso.oidc.custom;

import com.nimbusds.oauth2.sdk.auth.ClientAuthentication;
import com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod;
import com.nimbusds.oauth2.sdk.http.HTTPRequest;
import com.nimbusds.oauth2.sdk.id.ClientID;


public class EmptyAuthentication extends ClientAuthentication {
  /**
   * Creates a new "None" client authentication.
   *
   * @param clientID The client identifier. Must not be {@code null}.
   */
  protected EmptyAuthentication(ClientID clientID) {
    super(ClientAuthenticationMethod.NONE, clientID);
  }

  @Override
  public void applyTo(HTTPRequest httpRequest) {
    return;
  }
}

@@ -239,16 +239,137 @@
 ientID;%0A
+import com.nimbusds.oauth2.sdk.util.URLUtils;%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Map;%0A
 %0A%0Apublic
@@ -743,14 +743,259 @@
     
-return
+Map%3CString, List%3CString%3E%3E params = httpRequest.getQueryParameters();%0A    params.put(%22client_id%22, Collections.singletonList(getClientID().getValue()));%0A    String queryString = URLUtils.serializeParameters(params);%0A    httpRequest.setQuery(queryString)
 ;%0A  

Attach Client ID to token request in Authentication Mode none (#3308)