Skip to content

Commit

Permalink
Add bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
willmostly committed Oct 30, 2024
1 parent 947ba40 commit 4a4db41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import io.trino.gateway.ha.resource.LoginResource;
import io.trino.gateway.ha.resource.PublicResource;
import io.trino.gateway.ha.resource.TrinoResource;
import io.trino.gateway.ha.router.OAuth2GatewayCookieProvider;
import io.trino.gateway.ha.security.AuthorizedExceptionMapper;
import io.trino.gateway.proxyserver.ForProxy;
import io.trino.gateway.proxyserver.ProxyRequestHandler;
Expand Down Expand Up @@ -121,6 +122,7 @@ public void configure(Binder binder)
registerResources(binder);
registerProxyResources(binder);
jaxrsBinder(binder).bind(RoutingTargetHandler.class);
jaxrsBinder(binder).bind(OAuth2GatewayCookieProvider.class);
addManagedApps(configuration, binder);
jaxrsBinder(binder).bind(AuthorizedExceptionMapper.class);
binder.bind(ProxyHandlerStats.class).in(Scopes.SINGLETON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package io.trino.gateway.ha.router;

import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import com.google.inject.Provides;
import io.airlift.units.Duration;
import io.trino.gateway.ha.config.HaGatewayConfiguration;
Expand All @@ -26,6 +27,7 @@ public class OAuth2GatewayCookieProvider
private final List<String> deletePaths;
private final Duration ttl;

@Inject
public OAuth2GatewayCookieProvider(HaGatewayConfiguration configuration)
{
this.deletePaths = configuration.getOauth2GatewayCookieConfiguration().getDeletePaths();
Expand Down

0 comments on commit 4a4db41

Please sign in to comment.