···4848 // At least one redirect URI is required.
4949 RedirectURIs []string `json:"redirect_uris"`
50505151- // confidential clients must set this to `private_key_jwt`; public must be `none`
5252- // TODO: should this be string not *string?
5353- TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"`
5151+ // Confidential clients must set this to `private_key_jwt`; public must be `none`.
5252+ // In some sense this field is "optional" (including in atproto OAuth specs), but it is effectively required, because the default value is invalid for atproto OAuth.
5353+ TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"`
54545555 // `none` is never allowed here. The current recommended and most-supported algorithm is ES256, but this may evolve over time.
5656 TokenEndpointAuthSigningAlg *string `json:"token_endpoint_auth_signing_alg,omitempty"`
···82828383// returns 'true' if client metadata indicates that this is a confidential client
8484func (m *ClientMetadata) IsConfidential() bool {
8585- if (m.JWKSUri != nil || (m.JWKS != nil && len(m.JWKS.Keys) > 0)) && (m.TokenEndpointAuthMethod != nil && *m.TokenEndpointAuthMethod == "private_key_jwt") {
8585+ if (m.JWKSUri != nil || (m.JWKS != nil && len(m.JWKS.Keys) > 0)) && m.TokenEndpointAuthMethod == "private_key_jwt" {
8686 return true
8787 }
8888