Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- saveCredentials :: MonadUnliftIO m => CredentialManager -> CodeserverId -> CodeserverCredentials -> m ()
- data CredentialManager
- newCredentialManager :: MonadIO m => m CredentialManager
- getCredentials :: MonadIO m => CredentialManager -> CodeserverId -> m (Either CredentialFailure CodeserverCredentials)
- isExpired :: MonadIO m => CodeserverCredentials -> m Bool
Documentation
saveCredentials :: MonadUnliftIO m => CredentialManager -> CodeserverId -> CodeserverCredentials -> m () Source #
Saves credentials to the active profile.
data CredentialManager Source #
A CredentialManager
knows how to load, save, and cache credentials.
It's thread-safe and safe for use across multiple UCM clients.
Note: Currently the in-memory cache is _not_ updated if a different UCM updates
the credentials file, however this shouldn't pose any problems, since auth will still
be refreshed if we encounter any auth failures on requests.
newCredentialManager :: MonadIO m => m CredentialManager Source #
getCredentials :: MonadIO m => CredentialManager -> CodeserverId -> m (Either CredentialFailure CodeserverCredentials) Source #