graphql-engine/server/src-lib/Hasura/CredentialCache.hs
Rishichandra Wawhal c6d65508b2 [feature branch] EE Lite Trials
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8208
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
Co-authored-by: Solomon <24038+solomon-b@users.noreply.github.com>
Co-authored-by: gneeri <10553562+gneeri@users.noreply.github.com>
GitOrigin-RevId: 454ee0dea636da77e43810edb2f427137027956c
2023-04-05 08:59:09 +00:00

20 lines
596 B
Haskell

{-# LANGUAGE NumericUnderscores #-}
-- | Interface for a service for maintaining short-lived credentials, such as
-- access tokens or JWTs.
module Hasura.CredentialCache
( CredentialCache (..),
)
where
import Control.Concurrent.STM
import Hasura.Prelude
newtype CredentialCache cred = CredentialCache
{ -- | Get the stored credential. Also returns an STM action for
-- requesting a refresh of the credential, which, in turn, returns an STM
-- action for waiting on the arrival of the fresh credential.
getCredential :: STM (cred, STM (STM ()))
}
deriving stock (Functor)