This is an automated email from the ASF dual-hosted git repository. ahuber pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/causeway.git
commit e66290fe9be87aa0e4c5dc55bce1993a54330624 Author: Andi Huber <[email protected]> AuthorDate: Wed Nov 5 06:05:16 2025 +0100 CAUSEWAY-3939: java-doc and typo fixes --- .../causeway/applib/services/bookmark/HmacAuthority.java | 12 +++++++----- .../runtimeservices/CausewayModuleCoreRuntimeServices.java | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/api/applib/src/main/java/org/apache/causeway/applib/services/bookmark/HmacAuthority.java b/api/applib/src/main/java/org/apache/causeway/applib/services/bookmark/HmacAuthority.java index 45a8fa78752..1b1e3563acb 100644 --- a/api/applib/src/main/java/org/apache/causeway/applib/services/bookmark/HmacAuthority.java +++ b/api/applib/src/main/java/org/apache/causeway/applib/services/bookmark/HmacAuthority.java @@ -29,7 +29,7 @@ import lombok.SneakyThrows; /** - * Can be registered with Spring, to override the build in default, which has an application scoped random secret. + * Can be registered with Spring, to override the built in default, which has an application scoped random secret. * * <pre> * {@code @Configuration} @@ -41,10 +41,12 @@ * } * </pre> * - * <p>Note that bookmark's validity is bound to the (server-side) secret key of the {@link HmacAuthority}. + * <p>Used to generate the bookmark of view models so that they are not susceptible to forgery or de-serialization attacks. + * (Bookmarks of entities are not susceptible). + * Note though, that the bookmarks' validity is bound to the (server-side) secret key of the {@link HmacAuthority}. * Once the secret changes, bookmarks that are stored client-side for later use, will be rendered invalid. * - * @apiNote the default bean is auto-configured with 'CausewayModuleCoreRuntimeServices.HmacAutorityAutoconfigure' + * @apiNote the default bean is auto-configured with 'CausewayModuleCoreRuntimeServices.HmacAuthorityAutoconfigure' * * @since 3.5 */ @@ -71,7 +73,7 @@ default boolean verifyHmac(final @Nullable byte[] data, final @Nullable byte[] h /** * Whether HMAC length in bytes is expected/valid. */ - boolean isValidHmacLength(final int hmacLength); + boolean isValidHmacLength(int hmacLength); // -- IMPL @@ -116,6 +118,6 @@ private Mac newMac() { // JUNIT SUPPORT static HmacAuthority forTesting() { - return new HmacSHA256("secret for testing onyl".getBytes()); + return new HmacSHA256("secret for testing only".getBytes()); } } diff --git a/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/CausewayModuleCoreRuntimeServices.java b/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/CausewayModuleCoreRuntimeServices.java index 3a619bb9cd9..d51043e4882 100644 --- a/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/CausewayModuleCoreRuntimeServices.java +++ b/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/CausewayModuleCoreRuntimeServices.java @@ -132,7 +132,7 @@ ExceptionRecognizerForDataAccessException.class, // auto configuration - CausewayModuleCoreRuntimeServices.HmacAutorityAutoconfigure.class + CausewayModuleCoreRuntimeServices.HmacAuthorityAutoconfigure.class }) @ComponentScan(basePackages = "org.apache.causeway.core.runtimeservices.icons") @@ -147,7 +147,7 @@ public OrderComparator orderComparator() { @AutoConfigureOrder(PriorityPrecedence.LATE) @Configuration - static class HmacAutorityAutoconfigure { + static class HmacAuthorityAutoconfigure { @Bean(NAMESPACE + ".fallbackHmacAuthority") @ConditionalOnMissingBean(HmacAuthority.class) public HmacAuthority fallbackHmacAuthority() {
