| 637 | } |
| 638 | |
| 639 | func (o *AuthOIDCConfig) Validate() error { |
| 640 | if !o.DeviceFlow && !o.AuthorizationCodeFlow { |
| 641 | return fmt.Errorf("at least one of deviceFlow or authorizationCodeFlow must be enabled") |
| 642 | } |
| 643 | if o.AuthorizationCodeFlow && o.RedirectURI == "" { |
| 644 | return wrap(fmt.Errorf("redirectURI is required if the authorization code flow is enabled"), "redirectURI") |
| 645 | } |
| 646 | return o.HTTPClientConfiguration.Validate() |
| 647 | } |
| 648 | |
| 649 | type AuthGenericConfig struct { |
| 650 | // AuthorizeEndpointURL is the endpoint configuration for the OAuth2 authorization |