microsoft-translator-0.1.0.0: Bindings to the Microsoft Translator API

Safe HaskellNone
LanguageHaskell2010

Microsoft.Translator.API.Auth

Synopsis

Documentation

data AuthToken Source #

The JSON Web Token issued by MS Microsoft.Translator token service. Consists of wrapped text. Valid for ten minutes.

Instances

Show AuthToken Source # 
Generic AuthToken Source # 

Associated Types

type Rep AuthToken :: * -> * #

ToHttpApiData AuthToken Source # 
type Rep AuthToken Source # 
type Rep AuthToken = D1 * (MetaData "AuthToken" "Microsoft.Translator.API.Auth" "microsoft-translator-0.1.0.0-KAN9eIyd1CjKxyJQYwBcwG" True) (C1 * (MetaCons "AuthToken" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)))

issueToken :: Manager -> SubscriptionKey -> IO (Either TranslatorException AuthToken) Source #

Retrieve a token from the API. It will be valid for 10 minutes.