Package com.pexip.sdk.api.infinity
Class TokenStore
-
- All Implemented Interfaces:
public final class TokenStoreA token store.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTokenStore.Companion
-
Field Summary
Fields Modifier and Type Field Description private final StateFlow<Token>tokenpublic final static TokenStore.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description TokenStore(Token token)
-
Method Summary
Modifier and Type Method Description final StateFlow<Token>getToken()The store token. final JobrefreshTokenIn(CoroutineScope scope, SuspendFunction1<Token, Token> refreshToken, SuspendFunction1<Token, Unit> releaseToken, SuspendFunction1<Throwable, Unit> onFailure)A helper function to refresh and release the Token found in TokenStore. final static TokenStorecreate(Token token)-
-
Constructor Detail
-
TokenStore
TokenStore(Token token)
-
-
Method Detail
-
refreshTokenIn
final Job refreshTokenIn(CoroutineScope scope, SuspendFunction1<Token, Token> refreshToken, SuspendFunction1<Token, Unit> releaseToken, SuspendFunction1<Throwable, Unit> onFailure)
A helper function to refresh and release the Token found in TokenStore.
Note that this function is not intended for consumers to use directly.
-
create
@Deprecated(message = "Should not be used by the consumers of the SDK.", replaceWith = @ReplaceWith(imports = {}, expression = "TokenStore(token)"), level = DeprecationLevel.ERROR) final static TokenStore create(Token token)
-
-
-
-