CachedBuilder

com.permutive.gcp.auth.TokenProvider.CachedBuilder
final class CachedBuilder[F[_]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def build(tokenProvider: TokenProvider[F]): Resource[F, TokenProvider[F]]
def build(tokenProvider: F[TokenProvider[F]]): Resource[F, TokenProvider[F]]

What to do if retrying to refresh the token fails even after retries. The refresh fiber will have failed at this point and the value will grow stale. It is up to the user to handle this failure, as they see fit, in their application

What to do if retrying to refresh the token fails even after retries. The refresh fiber will have failed at this point and the value will grow stale. It is up to the user to handle this failure, as they see fit, in their application

Attributes

A callback invoked whenever a new token is generated, the scala.concurrent.duration.FiniteDuration is the period that will be waited before the next new token

A callback invoked whenever a new token is generated, the scala.concurrent.duration.FiniteDuration is the period that will be waited before the next new token

Attributes

What to do if retrying to refresh the token fails. The refresh fiber will have failed at this point and the token will grow stale. It is up to the user to handle this failure, as they see fit, in their application

What to do if retrying to refresh the token fails. The refresh fiber will have failed at this point and the token will grow stale. It is up to the user to handle this failure, as they see fit, in their application

Attributes

def retryPolicy(retryPolicy: RetryPolicy[F]): CachedBuilder[F]

An optional configuration object for attempting to retry retrieving the token on failure. When no value is supplied this defaults to 5 retries with a delay between each of 200 milliseconds.

An optional configuration object for attempting to retry retrieving the token on failure. When no value is supplied this defaults to 5 retries with a delay between each of 200 milliseconds.

Attributes

How much time less than the indicated expiry to cache a token for; this is to give a safety buffer to ensure an expired token is never used in a request. Defaults to four minutes to ensure a new token will be provided and have no risk of requests using an expired token

How much time less than the indicated expiry to cache a token for; this is to give a safety buffer to ensure an expired token is never used in a request. Defaults to four minutes to ensure a new token will be provided and have no risk of requests using an expired token

Attributes