Class AuthorizationPaths


  • public class AuthorizationPaths
    extends Object
    • Constructor Detail

      • AuthorizationPaths

        public AuthorizationPaths()
    • Method Detail

      • setNonMemorizablePaths

        public void setNonMemorizablePaths​(List<String> nonMemorizablePaths)
        Sets paths that should not be remembered before login processing. Old paths will be discarded. This setting is applicable if user agent supports login page authentication.
        Parameters:
        nonMemorizablePaths - list of paths that should not be remembered before login processing
      • matchesNonMemorizablePath

        public boolean matchesNonMemorizablePath​(String path)
        Check if provided path should not be remembered.
        Parameters:
        path - path
        Returns:
        true if path is non memorizable, false otherwise
      • addPath

        public void addPath​(@Nullable
                            Class<?> hanlerType,
                            @NotNull
                            String path)
        Adds path associated wit particular handler class that does not require authentication check.
        Parameters:
        handlerType - a handler class that does not require authentication for provided path (in case handlerType is null, provided pass will be associated with all handlers).
        path - a path.
      • isAuthenticationRequired

        public boolean isAuthenticationRequired​(@NotNull
                                                Object handler,
                                                @NotNull
                                                javax.servlet.http.HttpServletRequest request)
        Check if authentication is required for given path in scope of provided handler. It does that by checking if the path matches pattern associated with all handlers and patterns associated with provided handler (if it is not null).
        Parameters:
        handler - a controller processing given path.
        path - path.
        Returns:
        true if authentication is required, false otherwise.
      • getLookupPath

        @NotNull
        public static String getLookupPath​(@NotNull
                                           javax.servlet.http.HttpServletRequest request)