MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / claimsAuthentic

Function claimsAuthentic

rest/oidc_api_test.go:348–361  ·  view source on GitHub ↗

claimsAuthentic returns an authentic claim set that contains both primary and secondary claims.

()

Source from the content-addressed store, hash-verified

346// claimsAuthentic returns an authentic claim set that contains both primary
347// and secondary claims.
348func claimsAuthentic() claimSet {
349 primaryClaims := jwt.Claims{
350 ID: "id0123456789",
351 Subject: "noah",
352 Audience: jwt.Audience{"aud1", "aud2", "aud3", "baz"},
353 IssuedAt: jwt.NewNumericDate(time.Now()),
354 Expiry: jwt.NewNumericDate(time.Now().Add(5 * time.Minute)),
355 }
356 secondaryClaims := map[string]interface{}{"email": "noah@foo.com"}
357 return claimSet{
358 primaryClaims: primaryClaims,
359 secondaryClaims: secondaryClaims,
360 }
361}
362
363// claimsAuthenticWithUsernameClaim returns an authentic claim set after
364// setting the given secondary claims.

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected