You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Andrea Di Lisio edited this page Aug 29, 2023
·
5 revisions
The library comes with options for caching client credentials, thus avoiding to call Oauth endpoints on each authenticated API invocation.
Default behavior: no cache
By default, the library does not cache any token. To enable the caching feature there are two options: using a default in-memory cache or define custom cache storage. Either way developers are not asked to provide an implementation that takes care of the expiration of the token.
Enabling the default in-memory caching
To enable the default in memory cache it's enough to invoke the withCredentialsCaching() on the client builder instance.