Class InMemoryTokenStore

java.lang.Object
com.qtsurfer.api.sdk.auth.InMemoryTokenStore
All Implemented Interfaces:
TokenStore

public final class InMemoryTokenStore extends Object implements TokenStore
Default TokenStore — holds the most recent token in a single in-memory slot. Lost on JVM exit. Sufficient for short-lived scripts and for tests.
  • Constructor Details

    • InMemoryTokenStore

      public InMemoryTokenStore()
  • Method Details

    • load

      public com.qtsurfer.api.client.model.AuthTokenResponse load()
      Returns whatever was last written to the single in-memory slot — null before the first save(com.qtsurfer.api.client.model.AuthTokenResponse) or after clear().
      Specified by:
      load in interface TokenStore
    • save

      public void save(com.qtsurfer.api.client.model.AuthTokenResponse token)
      Overwrites the single slot; passing null has the same effect as clear().
      Specified by:
      save in interface TokenStore
    • clear

      public void clear()
      Drops the in-memory token; nothing here survives past this call or JVM exit.
      Specified by:
      clear in interface TokenStore