tesla-0.7.4.0: Tesla API client.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Tesla.Auth

Description

Authentication related data structures.

Synopsis

Documentation

data AuthInfo Source #

An Authentication request.

Instances

Instances details
Show AuthInfo Source # 
Instance details

Defined in Tesla.Auth

fromToken :: String -> AuthInfo Source #

Get an AuthInfo instance from a bearer token.

data AuthResponse Source #

An Authentication response.

Instances

Instances details
FromJSON AuthResponse Source # 
Instance details

Defined in Tesla.Auth

Methods

parseJSON :: Value -> Parser AuthResponse

parseJSONList :: Value -> Parser [AuthResponse]

ToJSON AuthResponse Source # 
Instance details

Defined in Tesla.Auth

Methods

toJSON :: AuthResponse -> Value

toEncoding :: AuthResponse -> Encoding

toJSONList :: [AuthResponse] -> Value

toEncodingList :: [AuthResponse] -> Encoding

Generic AuthResponse Source # 
Instance details

Defined in Tesla.Auth

Associated Types

type Rep AuthResponse :: Type -> Type #

Show AuthResponse Source # 
Instance details

Defined in Tesla.Auth

type Rep AuthResponse Source # 
Instance details

Defined in Tesla.Auth

type Rep AuthResponse = D1 ('MetaData "AuthResponse" "Tesla.Auth" "tesla-0.7.4.0-8rAp9nRjw7z31SQUSkgJUc" 'False) (C1 ('MetaCons "AuthResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "_access_token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "_expires_in") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "_refresh_token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))

class Monad m => HasTeslaAuth m where Source #

A Monad may have a HasTeslaAuth instance to indicate it knows how to authenticate against the Tesla service.

Instances

Instances details
(Monad m, MonadIO m, MonadReader EnergyEnv m) => HasTeslaAuth m Source # 
Instance details

Defined in Tesla.Energy

(Monad m, MonadIO m, MonadReader CarEnv m) => HasTeslaAuth m Source # 
Instance details

Defined in Tesla.Car