File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ public actor CachingTokenSource: TokenSource, Loggable {
173173 public init (
174174 _ source: TokenSource ,
175175 store: TokenStore = InMemoryTokenStore ( ) ,
176- validator: @escaping TokenValidator = { _, res in res . hasValidToken ( ) }
176+ validator: @escaping TokenValidator = { _, response in response . hasValidToken ( ) }
177177 ) {
178178 self . source = source
179179 self . store = store
@@ -201,9 +201,9 @@ public actor CachingTokenSource: TokenSource, Loggable {
201201 }
202202
203203 /// Get the cached credentials
204- /// - Returns: The cached credentials if found, nil otherwise
205- public func getCachedCredentials ( ) async -> CachingTokenSource . Cached ? {
206- await store. retrieve ( )
204+ /// - Returns: The cached token if found, nil otherwise
205+ public func cachedToken ( ) async -> Token . Response ? {
206+ await store. retrieve ( ) ? . 1
207207 }
208208}
209209
You can’t perform that action at this time.
0 commit comments