Skip to content

Commit

Permalink
CB-5807. Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisSinelnikov committed Dec 17, 2024
1 parent f68d3cf commit 6965284
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ WebLogoutInfo authLogout(
WebUserInfo activeUser(@NotNull WebSession webSession) throws DBWebException;

@WebAction(authRequired = false)
WebAuthProviderInfo[] getAuthProviders(WebSession webSession);
WebAuthProviderInfo[] getAuthProviders();

@WebAction()
boolean changeLocalPassword(@NotNull WebSession webSession, @NotNull String oldPassword, @NotNull String newPassword) throws DBWebException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void bindWiring(DBWBindingContext model) throws DBWebException {
CommonUtils.toBoolean(env.getArgument("linkUser"))
))
.dataFetcher("activeUser", env -> getService(env).activeUser(getWebSession(env, false)))
.dataFetcher("authProviders", env -> getService(env).getAuthProviders(getWebSession(env)))
.dataFetcher("authProviders", env -> getService(env).getAuthProviders())
.dataFetcher("authChangeLocalPassword", env -> getService(env).changeLocalPassword(
getWebSession(env),
env.getArgument("oldPassword"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ public WebUserInfo activeUser(@NotNull WebSession webSession) throws DBWebExcept
}

@Override
public WebAuthProviderInfo[] getAuthProviders(WebSession webSession) {
public WebAuthProviderInfo[] getAuthProviders() {
return WebAuthProviderRegistry.getInstance().getAuthProviders()
.stream().map(p -> new WebAuthProviderInfo(webSession, p))
.stream().map(WebAuthProviderInfo::new)
.toArray(WebAuthProviderInfo[]::new);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ public class WebAuthProviderInfo {
private static final Log log = Log.getLog(WebAuthProviderInfo.class);

private final WebAuthProviderDescriptor descriptor;
private final WebSession webSession;

public WebAuthProviderInfo(WebSession webSession, WebAuthProviderDescriptor descriptor) {
public WebAuthProviderInfo(WebAuthProviderDescriptor descriptor) {
this.descriptor = descriptor;
this.webSession = webSession;
}

WebAuthProviderDescriptor getDescriptor() {
Expand Down
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
</configuration>
<credentials>
<propertyGroup label="Auth credentials">
<property id="user-dn" label="%user-dn" type="string" description="%user-dn.description" user="true"/>
<property id="password" label="%password" type="string" description="%password.description"
<property id="user-dn" label="User DN" type="string" description="LDAP user name" user="true"/>
<property id="password" label="User password" type="string" description="LDAP user password"
user="true" encryption="plain"/>
</propertyGroup>
</credentials>
Expand Down

0 comments on commit 6965284

Please sign in to comment.