Add commented out website token code
This commit is contained in:
parent
f49135a781
commit
43e91b63be
@ -4,11 +4,13 @@ import com.google.common.collect.ImmutableMap;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.http.HttpMethod;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.frozenorb.apiv3.actor.Actor;
|
||||
import net.frozenorb.apiv3.actor.ActorType;
|
||||
import net.frozenorb.apiv3.util.ErrorUtils;
|
||||
import net.frozenorb.apiv3.util.UserSessionUtils;
|
||||
|
||||
@Slf4j
|
||||
public final class WebsiteUserSessionHandler implements Handler<RoutingContext> {
|
||||
|
||||
@Override
|
||||
@ -46,21 +48,44 @@ public final class WebsiteUserSessionHandler implements Handler<RoutingContext>
|
||||
HttpMethod method = ctx.request().method();
|
||||
String path = ctx.request().path().toLowerCase();
|
||||
|
||||
/*
|
||||
http.get("/emailTokens/:emailToken/owner").blockingHandler(new GETEmailTokensIdOwner(), false);
|
||||
http.get("/ranks/:rankId").handler(new GETRanksId());
|
||||
http.get("/serverGroups/:serverGroupId").handler(new GETServerGroupsId());
|
||||
http.get("/servers/:serverId").handler(new GETServersId());
|
||||
http.get("/dumps/:dumpType").handler(new GETDumpsType());
|
||||
http.get("/users/:userId").handler(new GETUsersId());
|
||||
http.get("/users/:userId/compoundedPermissions").handler(new GETUsersIdCompoundedPermissions());
|
||||
http.get("/users/:userId/details").blockingHandler(new GETUsersIdDetails(), false);
|
||||
http.get("/users/:userId/requiresTotp").handler(new GETUsersIdRequiresTotp());
|
||||
http.get("/users/:userId/verifyPassword").blockingHandler(new GETUsersIdVerifyPassword(), false);
|
||||
|
||||
http.post("/users/:userId/changePassword").blockingHandler(new POSTUsersIdChangePassword(), false);
|
||||
http.post("/users/:userId/passwordReset").blockingHandler(new POSTUsersIdPasswordReset(), false);
|
||||
http.post("/users/:userId/verifyTotp").handler(new POSTUsersIdVerifyTotp());
|
||||
http.post("/logout").handler(new POSTLogout());
|
||||
http.post("/emailTokens/:emailToken/confirm").blockingHandler(new POSTEmailTokensIdConfirm(), false);
|
||||
*/
|
||||
|
||||
/*if (method == HttpMethod.GET) {
|
||||
switch (path) {
|
||||
case "/grants":
|
||||
case "/ranks":
|
||||
case "/metrics":
|
||||
case "/staff":
|
||||
case "/servers":
|
||||
case "/servergroups":
|
||||
case "/whoami":
|
||||
return false;
|
||||
}
|
||||
|
||||
if (path.contains("/dumps")) {
|
||||
for (String allowedRoutes : new String[] { "/emailTokens", "/ranks", "/serverGroups", "/servers", "/dumps", "/users" }) {
|
||||
if (path.contains(allowedRoutes)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else if (method == HttpMethod.POST) {
|
||||
switch (path) {
|
||||
case "/grants":
|
||||
case "/logout":
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
Loading…
Reference in New Issue
Block a user