graphql-engine/server/src-lib/Hasura/CredentialCache.hs
Samir Talwar be67b0db59 server: Make HLint pass, by hook or by crook.
This fixes the simple HLint warnings, and adds a few suppressions to avoid noise.

The suppressions don't really solve the problems, but I think the warnings here are quite benign and I'm uncomfortable with how likely I would be to introduce a bug during refactoring.

In the case of _pg-client_ and _resource-pool_, we can't use the recommended functions anyway, and there doesn't seem to be a way to tell HLint to ignore entire packages.

I have updated the `make` targets to only fail if errors or warnings are found, not suggestions. This brings it in line with the CI job.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8910
GitOrigin-RevId: 596277b4ae5833876fc3f43875208c1279518a59
2023-04-25 14:03:02 +00:00

18 lines
559 B
Haskell

-- | 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)