microsoft-translator-0.1.1: 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 # 
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.1-SJQ3sfTzucJoM4Lfl3DNf" 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.