Safe Haskell | None |
---|---|
Language | Haskell2010 |
Tesla.Auth
Description
Authentication related data structures.
Synopsis
- data AuthInfo = AuthInfo {
- _clientID :: String
- _clientSecret :: String
- _email :: String
- _password :: String
- _bearerToken :: String
- clientID :: Lens' AuthInfo String
- clientSecret :: Lens' AuthInfo String
- email :: Lens' AuthInfo String
- password :: Lens' AuthInfo String
- bearerToken :: Lens' AuthInfo String
- fromToken :: String -> AuthInfo
- data AuthResponse = AuthResponse {}
- access_token :: Lens' AuthResponse String
- expires_in :: Lens' AuthResponse Int
- refresh_token :: Lens' AuthResponse String
- class Monad m => HasTeslaAuth m where
Documentation
An Authentication request.
data AuthResponse Source #
An Authentication response.
Constructors
AuthResponse | |
Fields
|
Instances
Show AuthResponse Source # | |
Defined in Tesla.Auth Methods showsPrec :: Int -> AuthResponse -> ShowS # show :: AuthResponse -> String # showList :: [AuthResponse] -> ShowS # | |
Generic AuthResponse Source # | |
Defined in Tesla.Auth Associated Types type Rep AuthResponse :: Type -> Type # | |
FromJSON AuthResponse Source # | |
Defined in Tesla.Auth | |
type Rep AuthResponse Source # | |
Defined in Tesla.Auth type Rep AuthResponse = D1 (MetaData "AuthResponse" "Tesla.Auth" "tesla-0.2.0.0-6Kg9IZLFiTKLTa1rstQAdL" 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
(Monad m, MonadIO m, MonadReader EnergyEnv m) => HasTeslaAuth m Source # | |
Defined in Tesla.Energy | |
(Monad m, MonadIO m, MonadReader CarEnv m) => HasTeslaAuth m Source # | |