mirror of
https://github.com/therootcompany/libauth.git
synced 2025-04-19 06:00:49 +00:00
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…
x
Reference in New Issue
Block a user