Skip to content

Commit cbc361b

Browse files
autodoc updates (#2188)
Co-authored-by: lestrrat <lestrrat@users.noreply.github.com>
1 parent 12c6da0 commit cbc361b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docs/01-jwt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,11 @@ func Example_jwt_parse_with_jku() {
819819
// its own keys accepted as "the issuer's keys". This example uses
820820
// srv.URL as a "known issuer" because httptest picks a random
821821
// port each run.
822+
//
823+
// If you use a RegexpWhitelist instead of a MapWhitelist, anchor
824+
// the pattern — e.g. `^https://issuer\.example/` — because patterns
825+
// are NOT anchored for you, and an unanchored pattern silently
826+
// allows look-alike hosts like issuer.example.attacker.com.
822827
client := jwkfetch.NewClient(
823828
// httptest serves HTTPS with a self-signed cert, so the
824829
// Client needs srv.Client() to validate it.

0 commit comments

Comments
 (0)