doc: add missing 'return' in example

This commit is contained in:
AJ ONeal 2022-05-05 18:15:02 -06:00
parent 929b3b9db3
commit 33ad482d74
No known key found for this signature in database
GPG Key ID: 562702827EF68D87
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ func main() {
jws, ok := ctx.Value(chiauth.JWSKey).(*libauth.JWS) jws, ok := ctx.Value(chiauth.JWSKey).(*libauth.JWS)
if !ok || !jws.Trusted { if !ok || !jws.Trusted {
http.Error(w, "Unauthorized", http.StatusUnauthorized) http.Error(w, "Unauthorized", http.StatusUnauthorized)
return
} }
userID := jws.Claims["sub"].(string) userID := jws.Claims["sub"].(string)