Interface NoAuthResolver

All Superinterfaces:
Resolver
All Known Implementing Classes:
LocaleJSONResolver, LoginPageResolver, LoginResolver, LogoutResolver, MetadataJSONResolver, NetworkMetadataJSONResolver, PublicHtmlResolver, RegisterPageResolver, RegisterResolver, RootPageResolver, StaticResourceResolver, VersionJSONResolver, WhoAmIJSONResolver

public interface NoAuthResolver extends Resolver
Special Resolver that gives responses without user authentication.
  • Method Details

    • canAccess

      default boolean canAccess(Request request)
      Description copied from interface: Resolver
      Implement access control if authorization is enabled.

      Is not called when access control is not active.

      Specified by:
      canAccess in interface Resolver
      Parameters:
      request - HTTP request, contains all information necessary to check access.
      Returns:
      true if allowed or invalid target, false if response should be 403 (forbidden)
      See Also:
    • resolve

      Optional<Response> resolve(Request request)
      Implement request resolution.
      Specified by:
      resolve in interface Resolver
      Parameters:
      request - HTTP request, contains all information necessary to resolve the request.
      Returns:
      Response or empty if the response should be 404 (not found).
      See Also:
    • requiresAuth

      default boolean requiresAuth(Request request)
      Specified by:
      requiresAuth in interface Resolver