Skip to content

Commit

Permalink
fix(server): better code
Browse files Browse the repository at this point in the history
  • Loading branch information
SunnyBoy-WYH committed Mar 13, 2024
1 parent 80c1634 commit ed250f2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.io.IOException;
import java.net.URI;

import org.apache.hugegraph.auth.HugeAuthenticator;
import org.apache.hugegraph.config.HugeConfig;
import org.apache.hugegraph.config.ServerOptions;
import org.apache.hugegraph.core.GraphManager;
Expand Down Expand Up @@ -120,9 +121,11 @@ public void filter(ContainerRequestContext requestContext,
}

// Unset the context in "HugeAuthenticator", need distinguish Graph/Auth server lifecycle
GraphManager graphManager = managerProvider.get();
GraphManager manager = managerProvider.get();
// TODO transfer Authorizer if we need after.
graphManager.unAuthenticate(null);
if (manager.requireAuthentication()) {
manager.unAuthenticate(null);
}
}

private boolean statusOk(int status) {
Expand Down

0 comments on commit ed250f2

Please sign in to comment.