Class AuthTokenThreadContextListener

java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.AuthTokenThreadContextListener
All Implemented Interfaces:
ThreadContextListener, Comparable<ThreadContextListener>

public class AuthTokenThreadContextListener extends Object implements ThreadContextListener
Implementation of ThreadContextListener that ensures the correct initialization of AuthTokens when working with non-container managed threads on all supported Cloud platforms.
  • Field Details

    • PROPERTY_AUTH_TOKEN

      public static final String PROPERTY_AUTH_TOKEN
      The ThreadContext key.
  • Constructor Details

    • AuthTokenThreadContextListener

      public AuthTokenThreadContextListener()
      Default constructor.
    • AuthTokenThreadContextListener

      public AuthTokenThreadContextListener(@Nonnull AuthToken authToken)
      Constructor for providing a AuthToken to be returned by this listener.
      Parameters:
      authToken - The AuthToken to be used by this listener.
  • Method Details