MCPcopy Create free account
hub / github.com/cloud-native-go/examples / TestBuildAndVerifyToken

Function TestBuildAndVerifyToken

ch12/jwt/token_test.go:25–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestBuildAndVerifyToken(t *testing.T) {
26 const name = "foobar"
27
28 token, err := buildToken(name)
29 assert.NoError(t, err)
30
31 claims, err := verifyToken(token)
32 assert.NoError(t, err)
33
34 assert.Equal(t, name, claims.Name)
35}

Callers

nothing calls this directly

Calls 2

buildTokenFunction · 0.85
verifyTokenFunction · 0.85

Tested by

no test coverage detected