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

Safe HaskellNone
LanguageHaskell2010

Microsoft.Translator.API.Auth

Description

Servant types and client for the authorization API

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 # 
Instance details

Defined in Microsoft.Translator.API.Auth

Generic AuthToken Source # 
Instance details

Defined in Microsoft.Translator.API.Auth

Associated Types

type Rep AuthToken :: Type -> Type #

ToHttpApiData AuthToken Source # 
Instance details

Defined in Microsoft.Translator.API.Auth

type Rep AuthToken Source # 
Instance details

Defined in Microsoft.Translator.API.Auth

type Rep AuthToken = D1 (MetaData "AuthToken" "Microsoft.Translator.API.Auth" "microsoft-translator-0.1.2-2WixOZLIJMQ2W9Ir6On7A3" True) (C1 (MetaCons "AuthToken" PrefixI False) (S1 (MetaSel (Nothing :: Maybe 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.