Remove client-specific data from AuthInfo
This commit is contained in:
parent
39d20f51d8
commit
bb88c786f0
1 changed files with 7 additions and 5 deletions
|
@ -81,8 +81,8 @@ instance Hashable Method
|
||||||
-- POST /foo
|
-- POST /foo
|
||||||
-- @
|
-- @
|
||||||
data Endpoint = Endpoint
|
data Endpoint = Endpoint
|
||||||
{ _path :: [String] -- type collected
|
{ _path :: [String] -- type collected
|
||||||
, _method :: Method -- type collected
|
, _method :: Method -- type collected
|
||||||
} deriving (Eq, Ord, Generic)
|
} deriving (Eq, Ord, Generic)
|
||||||
|
|
||||||
instance Show Endpoint where
|
instance Show Endpoint where
|
||||||
|
@ -239,7 +239,6 @@ defResponse = Response
|
||||||
data AuthenticationInfo = AuthenticationInfo
|
data AuthenticationInfo = AuthenticationInfo
|
||||||
{ _authIntro :: String
|
{ _authIntro :: String
|
||||||
, _authDataRequired :: String
|
, _authDataRequired :: String
|
||||||
, _authUserReturned :: String
|
|
||||||
} deriving (Eq, Ord, Show)
|
} deriving (Eq, Ord, Show)
|
||||||
|
|
||||||
-- | A datatype that represents everything that can happen
|
-- | A datatype that represents everything that can happen
|
||||||
|
@ -583,10 +582,13 @@ markdown api = unlines $
|
||||||
authStr Nothing = []
|
authStr Nothing = []
|
||||||
authStr (Just auth) =
|
authStr (Just auth) =
|
||||||
"#### Authentication" :
|
"#### Authentication" :
|
||||||
"This endpoint is protected." :
|
"" :
|
||||||
auth ^. authIntro :
|
auth ^. authIntro :
|
||||||
"Data to supply" :
|
"" :
|
||||||
|
"Clients must supply the following data" :
|
||||||
|
"" :
|
||||||
auth ^. authDataRequired :
|
auth ^. authDataRequired :
|
||||||
|
"" :
|
||||||
[]
|
[]
|
||||||
|
|
||||||
capturesStr :: [DocCapture] -> [String]
|
capturesStr :: [DocCapture] -> [String]
|
||||||
|
|
Loading…
Reference in a new issue