What's new in EzyPlatform 1.3.7?
This release significantly improves error page rendering for both Admin and Web, introduces a more flexible API authentication extension mechanism, standardizes cookie utilities, and further refines the Market SSO workflow.
-
Improved error page rendering for Admin and WebUI-related exceptions such as
BadRequestException,ResourceNotFoundException,HttpNotFoundException,ForbiddenActionException,PermissionDeniedException,HttpForbiddenException,DeserializeBodyException, andDeserializeValueExceptionno longer redirect users to dedicated error URLs. Instead, the platform renders the corresponding400,403,404, and500error templates directly, preserving error information and providing a more reliable user experience. API requests continue to returnResponseEntitywith the appropriate HTTP status code and response body. -
Added WebAbstractGlobalExceptionHandlerThe Web SDK now includes
WebAbstractGlobalExceptionHandler, which standardizes the generation of400 Bad Request,403 Permission Denied,404 Not Found, and500 Internal Server Errorviews. Themes and custom implementations can override the default error templates through methods such asgetBadRequestViewTemplate(),getPermissionDeniedViewTemplate(),getNotFoundViewTemplate(), andgetServerErrorViewTemplate(). -
Standardized Admin error viewsAdded
AdminViewFactory.newErrorViewBuilder()to create Admin error pages using the same builder pattern as other views. Error pages now automatically include thecurrentPageTitlevariable, whileAdminViewDecoratorprovides default values forcurrentParentTitleandcurrentParentURL, ensuring consistent navigation and page rendering. -
Enhanced global exception handling
AdminGlobalErrorHandlerandWebGlobalErrorHandlernow distinguish between page requests and API requests more effectively. For page requests, the platform renders the appropriate error page directly instead of redirecting. For API requests or non-GET requests, JSON error responses continue to be returned. In debug mode, exceptions are still returned as responses to simplify troubleshooting during development. -
Added extensible API authentication eventIntroduced the
check_user_required_authentication_apievent, allowingWebAuthenticationInterceptorto ask registered event handlers whether an API requires user authentication, even when the URI has not been explicitly marked as authenticated inRequestURIManager. A correspondingWebCheckUserRequiredAuthenticationApiEventSchemaFetcherhas also been added to describe the event schema, includingrequestArguments,uriTemplate,method, and theBooleanresult. -
Standardized cookie utilitiesThe HTTP SDK now provides
HttpResponses.clearCookie()andHttpResponses.newClearedCookie()to standardize cookie removal. These utilities are reused for Admin access tokens, User access tokens, and Market SSO cookies while supporting configurablepathandhttpOnlyattributes, reducing duplicated code and improving consistency. -
Refined Market SSO workflow
AdminMarketProxyControllernow usesHttpResponses.newClearedCookie()to remove thenonceandcallbackUricookies after a successful callback. This change aligns Market SSO cookie handling with the rest of the platform and simplifies future maintenance.