Class DynamicPropertyKeysRequestContext

java.lang.Object
com.broadleafcommerce.auth.user.autoconfigure.support.keys.DynamicPropertyKeysRequestContext

public class DynamicPropertyKeysRequestContext extends Object
This serves as a WebApplicationContext.SCOPE_REQUEST bean to hold a stable, consistent value for public and private keys during a request lifecycle.

We need to ensure that during a particular request lifecycle, we grab the 'latest' value at the first usage of these keys and then continue showing that same value for the rest of the request lifecycle (even if the 'latest' property value is refreshed in the middle of the request lifecycle).

This guarantees consistency in key values seen across method invocations (even by different components) for a particular request, while still ensuring new requests will always start with the 'latest' value.

See Also:
  • Constructor Details

    • DynamicPropertyKeysRequestContext

      public DynamicPropertyKeysRequestContext()
  • Method Details

    • atomicSetPublicIfUnset

      public boolean atomicSetPublicIfUnset(RSAPublicKey value)
    • atomicSetPrivateIfUnset

      public boolean atomicSetPrivateIfUnset(RSAPrivateKey value)
    • getPublic

      @Nullable public RSAPublicKey getPublic()
    • getPrivate

      @Nullable public RSAPrivateKey getPrivate()