{"modulePath":"github.com/memcode-ai/memcode","version":"v0.56.16","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package webjwt\n\nPackage webjwt is the ONE verifier for platform-signed inbound-webhook bearer tokens (Bot Framework, Google Chat): RS256 against a published JWKS, with issuer/audience/expiry enforced and the key set cached — an unknown kid triggers a refetch at most once per interval, so key rotation works but a forged-kid flood is not amplified into JWKS hammering. Two adapters verifying JWTs two different ways is how drift bugs happen; both use this.\n\nThe golang-jwt SDK lives ONLY here (guarded by TestVendorSDKsOnlyInTheirAdapters).\n\n## Types\n\n```go\ntype Verifier struct {\n\tMetadataURL string // OpenID configuration carrying jwks_uri; used when JWKSURL is empty\n\tJWKSURL     string // direct JWKS endpoint; takes precedence\n\tIssuer      string // required — an empty issuer never verifies\n\tAudience    string // required — an empty audience never verifies\n\tClient      *http.Client\n\t// contains filtered or unexported fields\n}\n```\nVerifier validates RS256 bearer tokens against one platform's JWKS. Set either JWKSURL directly (Google's certs endpoint) or MetadataURL (an OpenID configuration document whose jwks\\_uri is followed — Bot Framework). Fields are read on each Verify, so tests may point them at a fake server after construction and before first use.\n\n```go\nfunc (v *Verifier) Verify(ctx context.Context, raw string) error\n```\nVerify checks a raw compact JWT. It fails closed: missing configuration, unknown alg, unknown kid after one refresh, wrong issuer/audience, or an expired (or unexpiring) token are all errors.\n\n","path":"github.com/memcode-ai/memcode/internal/webjwt","name":"webjwt","synopsis":"Package webjwt is the ONE verifier for platform-signed inbound-webhook bearer tokens (Bot Framework, Google Chat): RS256 against a published JWKS, with issuer/audience/expiry enforced and the key set cached — an unknown kid triggers a refetch at most once per interval, so key rotation works but a forged-kid flood is not amplified into JWKS hammering.","isRedistributable":true}
