MCPcopy Create free account
hub / github.com/GetStream/stream-go2 / CreateUserTokenWithClaims

Method CreateUserTokenWithClaims

client.go:745–752  ·  view source on GitHub ↗
(userID string, claims map[string]any)

Source from the content-addressed store, hash-verified

743}
744
745func (c *Client) CreateUserTokenWithClaims(userID string, claims map[string]any) (string, error) {
746 claims["user_id"] = userID
747 jwtclaims := jwt.MapClaims{}
748 for k, v := range claims {
749 jwtclaims[k] = v
750 }
751 return c.authenticator.jwtSignatureFromClaims(jwtclaims)
752}

Callers 1

Calls 1

Tested by 1