Add OpenID support to webapp

This commit is contained in:
eikek
2021-09-05 23:43:07 +02:00
parent f8362329a9
commit 984dda9da0
13 changed files with 138 additions and 32 deletions

View File

@ -26,6 +26,7 @@ gb err =
, invalidInput = "Invalid input when processing the request."
, notFound = "The requested resource doesn't exist."
, invalidBody = \str -> "There was an error decoding the response: " ++ str
, accessDenied = "Access denied"
}
in
errorToString texts err
@ -44,6 +45,7 @@ de err =
, invalidInput = "Die Daten im Request waren ungültig."
, notFound = "Die angegebene Ressource wurde nicht gefunden."
, invalidBody = \str -> "Es gab einen Fehler beim Dekodieren der Antwort: " ++ str
, accessDenied = "Zugriff verweigert"
}
in
errorToString texts err
@ -61,6 +63,7 @@ type alias Texts =
, invalidInput : String
, notFound : String
, invalidBody : String -> String
, accessDenied : String
}
@ -90,6 +93,9 @@ errorToString texts error =
if sc == 404 then
texts.notFound
else if sc == 403 then
texts.accessDenied
else if sc >= 400 && sc < 500 then
texts.invalidInput