Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type TokenProvider = CodeserverId -> IO (Either CredentialFailure AccessToken)
- newTokenProvider :: CredentialManager -> TokenProvider
- performTokenRefresh :: MonadIO m => DiscoveryDoc -> Tokens -> m (Either CredentialFailure Tokens)
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.
newTokenProvider :: CredentialManager -> TokenProvider Source #
Creates a TokenProvider
using the given CredentialManager
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