Skip to content

Commit

Permalink
removed/replaced todo comments (#2679)
Browse files Browse the repository at this point in the history
  • Loading branch information
battermann authored Sep 8, 2022
1 parent 7a5e718 commit 1826a76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions libs/wire-api/src/Wire/API/Routes/Public/Spar.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,15 @@ type IdpCreate =
ReqBodyCustomError '[RawXML, JSON] "wai-error" IdPMetadataInfo
:> QueryParam' '[Optional, Strict] "replaces" SAML.IdPId
:> QueryParam' '[Optional, Strict] "api_version" WireIdPAPIVersion
:> QueryParam' '[Optional, Strict] "handle" (Range 1 32 Text) -- todo(leif): check length limitation
-- FUTUREWORK: The handle is restricted to 32 characters. Can we find a more reasonable upper bound and create a type for it? Also see `IdpUpdate`.
:> QueryParam' '[Optional, Strict] "handle" (Range 1 32 Text)
:> PostCreated '[JSON] IdP

type IdpUpdate =
ReqBodyCustomError '[RawXML, JSON] "wai-error" IdPMetadataInfo
:> Capture "id" SAML.IdPId
:> QueryParam' '[Optional, Strict] "handle" (Range 1 32 Text) -- todo(leif): check length limitation
-- FUTUREWORK: The handle is restricted to 32 characters. Can we find a more reasonable upper bound and create a type for it? Also see `IdpCreate`.
:> QueryParam' '[Optional, Strict] "handle" (Range 1 32 Text)
:> Put '[JSON] IdP

type IdpDelete =
Expand Down
4 changes: 3 additions & 1 deletion services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ idPToMem = evState . evEff
evEff = reinterpret @_ @(State TypedState) $ \case
InsertConfig iw ->
modify' (insertConfig iw)
NewHandle _tid -> pure $ IdPHandle "IdP 1" --todo(leif): generate a new handle
NewHandle _tid ->
-- Same handle for all IdPs is good enough, for now
pure $ IdPHandle "IdP 1"
GetConfig i ->
gets (getConfig i)
GetIdPByIssuerV1Maybe issuer ->
Expand Down

0 comments on commit 1826a76

Please sign in to comment.