playground-common-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Auth

Synopsis

Documentation

type API = FrontendAPI :<|> CallbackAPI Source #

We split out the API here because we don't want the Github Callback to be exported for the frontend to call directly.

type FrontendAPI = ("oauth" :> ((BrowserHeader "Cookie" Text :> ("status" :> Get '[JSON] AuthStatus)) :<|> ("github" :> GetRedirect (Headers '[Header "Location" Text])))) :<|> (BrowserHeader "Cookie" Text :> ("gists" :> GistAPI)) Source #

data AuthStatus Source #

Instances

Instances details
Eq AuthStatus Source # 
Instance details

Defined in Auth

Show AuthStatus Source # 
Instance details

Defined in Auth

Generic AuthStatus Source # 
Instance details

Defined in Auth

Associated Types

type Rep AuthStatus :: Type -> Type Source #

ToJSON AuthStatus Source # 
Instance details

Defined in Auth

FromJSON AuthStatus Source # 
Instance details

Defined in Auth

type Rep AuthStatus Source # 
Instance details

Defined in Auth

type Rep AuthStatus = D1 ('MetaData "AuthStatus" "Auth" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'True) (C1 ('MetaCons "AuthStatus" 'PrefixI 'True) (S1 ('MetaSel ('Just "_authStatusAuthRole") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AuthRole)))

data AuthRole Source #

Instances

Instances details
Eq AuthRole Source # 
Instance details

Defined in Auth

Show AuthRole Source # 
Instance details

Defined in Auth

Generic AuthRole Source # 
Instance details

Defined in Auth

Associated Types

type Rep AuthRole :: Type -> Type Source #

ToJSON AuthRole Source # 
Instance details

Defined in Auth

FromJSON AuthRole Source # 
Instance details

Defined in Auth

type Rep AuthRole Source # 
Instance details

Defined in Auth

type Rep AuthRole = D1 ('MetaData "AuthRole" "Auth" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "Anonymous" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GithubUser" 'PrefixI 'False) (U1 :: Type -> Type))

data Config Source #

Config supplied at runtime.

Instances

Instances details
FromJSON Config Source # 
Instance details

Defined in Auth

mkGithubEndpoints :: IO GithubEndpoints Source #

Config determined by Github.