doc: add missing 'return' in example
This commit is contained in:
parent
929b3b9db3
commit
33ad482d74
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue