packages feed

hercules-ci-api-0.6.0.0: src/Hercules/API/Auth.hs

{-# LANGUAGE DataKinds #-}

module Hercules.API.Auth where

import Hercules.API.Prelude
import Hercules.API.Servant.Status
import Servant.API
import Servant.API.Generic

-- | Endpoints for authentication
data AuthAPI f = AuthAPI
  { initiateGitHubLogin ::
      f
        :- "api"
        :> "auth"
        :> "github"
        :> QueryParam' '[Optional, Strict] "redirect" Text
        :> Get302 '[PlainText, JSON] '[]
  }
  deriving (Generic)