Skip to content

Commit

Permalink
Clarify docs for AuthenticateWithClaims
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-stytch committed Jan 25, 2024
1 parent 896587d commit 6a20e19
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions stytch/consumer/sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ func (c *SessionsClient) Authenticate(
}

// AuthenticateWithClaims fills in the claims pointer with custom claims from the response.
// Pass in a map with the types of values you're expecting so that this function can marshal
// the claims from the response. See ExampleClient_AuthenticateWithClaims_map,
// ExampleClient_AuthenticateWithClaims_struct for examples
//
// The value for claims must be one of these types:
// - A pointer to a map (*map[string]any), which will be overwritten with the custom claims.
// - A pointer to a struct (*T), which will be populated using its "json" struct tags.
//
// See ExampleClient_AuthenticateWithClaims_map, ExampleClient_AuthenticateWithClaims_struct for
// examples.
func (c *SessionsClient) AuthenticateWithClaims(
ctx context.Context,
body *sessions.AuthenticateParams,
Expand Down

0 comments on commit 6a20e19

Please sign in to comment.