amazonka-2.0: Comprehensive Amazon Web Services SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Auth.Background

Description

Helpers for authentication schemes which refresh themselves in the background.

Synopsis

Documentation

fetchAuthInBackground :: IO AuthEnv -> IO Auth Source #

Implements the background fetching behavior used by (among others) fromProfileName and fromContainer. Given an IO action that produces an AuthEnv, this spawns a thread that mutates the IORef returned in the resulting Auth to keep the temporary credentials up to date.