Safe Haskell | None |
---|---|
Language | Haskell2010 |
Servant types and client for the authorization API
- newtype SubscriptionKey = SubKey Text
- data AuthToken
- data TranslatorException
- issueToken :: Manager -> SubscriptionKey -> IO (Either TranslatorException AuthToken)
Documentation
newtype SubscriptionKey Source #
A key to your subscription to the service. Used to retrieve an AuthToken
.
The JSON Web Token issued by MS Microsoft.Translator token service. Consists of wrapped text. Valid for ten minutes.
data TranslatorException Source #
issueToken :: Manager -> SubscriptionKey -> IO (Either TranslatorException AuthToken) Source #
Retrieve a token from the API. It will be valid for 10 minutes.