MCPcopy Create free account
hub / github.com/supabase/auth / getToken

Function getToken

internal/api/context.go:46–53  ·  view source on GitHub ↗

getToken reads the JWT token from the context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

44
45// getToken reads the JWT token from the context.
46func getToken(ctx context.Context) *jwt.Token {
47 obj := ctx.Value(tokenKey)
48 if obj == nil {
49 return nil
50 }
51
52 return obj.(*jwt.Token)
53}
54
55func getClaims(ctx context.Context) *AccessTokenClaims {
56 token := getToken(ctx)

Callers 2

TestParseJWTClaimsMethod · 0.85
getClaimsFunction · 0.85

Calls 1

ValueMethod · 0.45

Tested by 1

TestParseJWTClaimsMethod · 0.68