| 217 | } |
| 218 | |
| 219 | func (v *Validator) ValidateDynamicRegistration(ctx context.Context, c *Client) error { |
| 220 | if c.Metadata != nil { |
| 221 | return errors.WithStack(ErrInvalidClientMetadata.WithHint(`"metadata" cannot be set for dynamic client registration`)) |
| 222 | } |
| 223 | if c.AccessTokenStrategy != "" { |
| 224 | return errors.WithStack(herodot.ErrBadRequest.WithReasonf("It is not allowed to choose your own access token strategy.")) |
| 225 | } |
| 226 | if c.SkipConsent { |
| 227 | return errors.WithStack(ErrInvalidRequest.WithDescription(`"skip_consent" cannot be set for dynamic client registration`)) |
| 228 | } |
| 229 | if c.SkipLogoutConsent.Bool { |
| 230 | return errors.WithStack(ErrInvalidRequest.WithDescription(`"skip_logout_consent" cannot be set for dynamic client registration`)) |
| 231 | } |
| 232 | |
| 233 | return v.Validate(ctx, c) |
| 234 | } |
| 235 | |
| 236 | func (v *Validator) ValidateSectorIdentifierURL(ctx context.Context, location string, redirectURIs []string) error { |
| 237 | l, err := url.Parse(location) |