vertx-web icon indicating copy to clipboard operation
vertx-web copied to clipboard

Introduce dataobjects and or builders for Vert.x Web handlers

Open tsegismont opened this issue 1 year ago • 1 comments

Review Vert.x Web handlers and determine which ones have several data params or callbacks.

These handlers should be reworked to provide a builder and/or a dataobject to simplify implementation.

tsegismont avatar Nov 21 '23 14:11 tsegismont

Analyzed existing handlers and found these are good candidates

  • CSPHandler
    • [x] builder
  • CSRFHandler
    • [x] data object
  • ~~ErrorHandler~~ skipped, just a couple of params only set in constructor
  • ~~FaviconHandler~~ skipped, single param only set in constructor
  • FormLoginHandler
    • [x] data object
  • ~~RedirectAuthHandler~~ skipped, just a couple of params only set in constructor
  • TemplateHandler
    • [x] remove setter, all params can be set in constructor
  • BodyHandler
    • [x] data object
  • ~~APIKeyHandler~~ skipped, custom logic
  • ~~AuthorizationHandler~~ skipped
  • ChainAuthHandler
    • [x] use a copy-on-write list for implementation (safer and more efficient)
  • ~~CorsHandler~~ skipped, custom logic
  • ~~JWTAuthHandler~~ skipped, custom logic
  • ~~LoggerHandler~~ skipped, just a couple of params only set in constructor
  • ~~OAuth2AuthHandler~~ skipped, custom logic
  • ~~OtpAuthHandler~~ skipped, custom logic
  • SessionHandler
    • [x] data object
  • StaticHandler
    • [x] data object
  • ~~HealthCheckHandler~~ skipped, not a good candidate

tsegismont avatar Dec 07 '23 17:12 tsegismont