-
public final class JwtTokenStorePersistent store mapping externalId -> JWT. Multi-user so ops queued under a previous user can still resolve their JWT at execution time. Storage is unconditional; usage of JWTs is gated on
IdentityVerificationService.ivBehaviorActive.Notifies two distinct audiences on JWT changes:
SDK-internal subscribers via IJwtUpdateListener (addInternalUpdateListener).
Developer-facing subscribers via IUserJwtInvalidatedListener (addUserJwtInvalidatedListener). Pure pub/sub: only listeners subscribed at the time of invalidateJwt receive the event. Matches iOS — no buffering for late subscribers.
-
-
Constructor Summary
Constructors Constructor Description JwtTokenStore(IPreferencesService _prefs)
-
Method Summary
Modifier and Type Method Description final UnitaddInternalUpdateListener(IJwtUpdateListener listener)final UnitremoveInternalUpdateListener(IJwtUpdateListener listener)final UnitaddUserJwtInvalidatedListener(IUserJwtInvalidatedListener listener)final UnitremoveUserJwtInvalidatedListener(IUserJwtInvalidatedListener listener)final StringgetJwt(String externalId)final UnitputJwt(String externalId, String jwt)Null jwt is a no-op; call invalidateJwt to remove a token. final UnitinvalidateJwt(String externalId)Removes the JWT for externalId and notifies developer-facing subscribers via IUserJwtInvalidatedListener. final UnitpruneToExternalIds(Set<String> activeIds)Drops JWTs whose externalId isn't in activeIds. -
-
Constructor Detail
-
JwtTokenStore
JwtTokenStore(IPreferencesService _prefs)
-
-
Method Detail
-
addInternalUpdateListener
final Unit addInternalUpdateListener(IJwtUpdateListener listener)
-
removeInternalUpdateListener
final Unit removeInternalUpdateListener(IJwtUpdateListener listener)
-
addUserJwtInvalidatedListener
final Unit addUserJwtInvalidatedListener(IUserJwtInvalidatedListener listener)
-
removeUserJwtInvalidatedListener
final Unit removeUserJwtInvalidatedListener(IUserJwtInvalidatedListener listener)
-
putJwt
final Unit putJwt(String externalId, String jwt)
Null jwt is a no-op; call invalidateJwt to remove a token.
-
invalidateJwt
final Unit invalidateJwt(String externalId)
Removes the JWT for externalId and notifies developer-facing subscribers via IUserJwtInvalidatedListener. Surfaced to the developer as "your JWT is no longer valid; please refresh." Don't call from internal cleanup paths (logout, user switch) — use a different mechanism if you need to clear without notifying the app.
-
pruneToExternalIds
final Unit pruneToExternalIds(Set<String> activeIds)
Drops JWTs whose externalId isn't in activeIds. Call on cold start to bound growth.
-
-
-
-