Skip to content

Commit

Permalink
fixes #54 fixes #57 fixes #58 - adds ServerSide check during plugin d…
Browse files Browse the repository at this point in the history
…efinition
  • Loading branch information
tjuerge committed Oct 24, 2021
1 parent 031cf27 commit 0f5d503
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
package org.vaulttec.sonarqube.auth.oidc;

import org.sonar.api.Plugin;
import org.sonar.api.SonarQubeSide;

public class AuthOidcPlugin implements Plugin {

@Override
public void define(Context context) {
context.addExtensions(OidcConfiguration.class, OidcClient.class, OidcIdentityProvider.class,
UserIdentityFactory.class, AutoLoginFilter.class);
context.addExtensions(OidcConfiguration.definitions());
if (context.getRuntime().getSonarQubeSide() == SonarQubeSide.SERVER) {
context.addExtensions(OidcConfiguration.class, OidcClient.class, OidcIdentityProvider.class,
UserIdentityFactory.class, AutoLoginFilter.class);
context.addExtensions(OidcConfiguration.definitions());
}
}

}

0 comments on commit 0f5d503

Please sign in to comment.