unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Auth.Tokens

Synopsis

Documentation

type TokenProvider = CodeserverId -> IO (Either CredentialFailure AccessToken) Source #

Given a CodeserverId, provide a valid AccessToken for the associated host. The TokenProvider may automatically refresh access tokens if we have a refresh token.

performTokenRefresh :: MonadIO m => DiscoveryDoc -> Tokens -> m (Either CredentialFailure Tokens) Source #

Don't yet support automatically refreshing tokens.

Specification: https://datatracker.ietf.org/doc/html/rfc6749#section-6