Add PKCE, token-body extras, AuthURL templating to OAuth2 → Add settings structs for Pattern-2 connector providers
- Add PKCE, token-body extras, AuthURL templating to OAuth2 - Add 13 connector provider enum values - Add scopes, display names, name resolvers for 13 providers - Add settings structs for Pattern-2 connector providers Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
@@ -35,6 +35,12 @@ type ConnectorConfig struct {
|
||||
type ConnectorConfigOAuth2 struct {
|
||||
ClientID string `json:"client-id"`
|
||||
ClientSecret string `json:"client-secret"`
|
||||
// IntegrationSlug is an operator-supplied value substituted into
|
||||
// providers whose static AuthURL contains a "{integration_slug}"
|
||||
// placeholder (Vercel-style integrations). It is propagated onto
|
||||
// OAuth2Connector.AuthURLParams and resolved by
|
||||
// connector.ApplyProviderDefaults.
|
||||
IntegrationSlug string `json:"integration-slug,omitempty"`
|
||||
}
|
||||
|
||||
func (c *Config) GetSlackSigningSecret() string {
|
||||
@@ -89,6 +95,12 @@ func (c *ConnectorConfig) UnmarshalJSON(data []byte) error {
|
||||
ClientSecret: config.ClientSecret,
|
||||
}
|
||||
|
||||
if config.IntegrationSlug != "" {
|
||||
oauth2Connector.AuthURLParams = map[string]string{
|
||||
"integration_slug": config.IntegrationSlug,
|
||||
}
|
||||
}
|
||||
|
||||
c.Config = &oauth2Connector
|
||||
default:
|
||||
return fmt.Errorf("unknown connector protocol: %q", c.Protocol)
|
||||
|
||||
Reference in New Issue
Block a user