Class AccessCheckHandler

  • All Implemented Interfaces:
    io.undertow.server.HttpHandler

    public class AccessCheckHandler
    extends java.lang.Object
    implements io.undertow.server.HttpHandler
    A handler that checks if the current user has access to the following handlers. If the user does not have access, 403 Forbidden is returned.
    • Method Detail

      • accessByRole

        public static <R extends RoleAccessCheckHandler.AccessByRole<R> accessByRole​(java.util.function.Function<? super java.lang.String,​? extends io.vavr.control.Option<? extends R>> mapper,
                                                                                       io.vavr.collection.Set<? extends R> roles)
      • accessByRole

        public static <R extends java.lang.Enum<?> & Role> ch.raffael.meldioc.library.http.server.undertow.handler.AccessCheckHandler.AccessByRoleEnum<R> accessByRole​(java.lang.Class<R> enumType,
                                                                                                                                                                       io.vavr.collection.Set<? extends R> roles)
      • handleRequest

        public void handleRequest​(io.undertow.server.HttpServerExchange exchange)
                           throws java.lang.Exception
        Specified by:
        handleRequest in interface io.undertow.server.HttpHandler
        Throws:
        java.lang.Exception