fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! added first event

This commit is contained in:
Iraq Jaber
2025-07-31 13:32:02 +01:00
parent 5ab959a6c1
commit 4f4ae3e6ea
5 changed files with 343 additions and 139 deletions

View File

@@ -18,7 +18,7 @@ const (
IDPTypeOAuth
IDPTypeLDAP
IDPTypeAzure
IDPTypeGitHub
IDPTypeGithub
IDPTypeGitHubEnterprise
IDPTypeGitLab
IDPTypeGitLabSelfHosted
@@ -93,7 +93,6 @@ type IDPOIDC struct {
}
type JWT struct {
IDPConfigID string `json:"idpConfigId"`
JWTEndpoint string `json:"jwtEndpoint,omitempty"`
Issuer string `json:"issuer,omitempty"`
KeysEndpoint string `json:"keysEndpoint,omitempty"`
@@ -106,8 +105,6 @@ type IDPJWT struct {
}
type OAuth struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
ClientID string `json:"clientId,omitempty"`
ClientSecret *crypto.CryptoValue `json:"clientSecret,omitempty"`
AuthorizationEndpoint string `json:"authorizationEndpoint,omitempty"`
@@ -133,8 +130,6 @@ const (
)
type Azure struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ClientID string `json:"client_id,omitempty"`
ClientSecret *crypto.CryptoValue `json:"client_secret,omitempty"`
Scopes []string `json:"scopes,omitempty"`
@@ -148,8 +143,6 @@ type IDPOAzureAD struct {
}
type Google struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
ClientID string `json:"clientId"`
ClientSecret *crypto.CryptoValue `json:"clientSecret"`
Scopes []string `json:"scopes,omitempty"`
@@ -160,6 +153,17 @@ type IDPGoogle struct {
Google
}
type Github struct {
ClientID string `json:"clientId"`
ClientSecret *crypto.CryptoValue `json:"clientSecret"`
Scopes []string `json:"scopes,omitempty"`
}
type IDPGithub struct {
*IdentityProvider
Github
}
// IDPIdentifierCondition is used to help specify a single identity_provider,
// it will either be used as the identity_provider ID or identity_provider name,
// as identity_provider can be identified either using (instanceID + OrgID + ID) OR (instanceID + OrgID + name)
@@ -235,4 +239,5 @@ type IDProviderRepository interface {
GetOAzureAD(ctx context.Context, id IDPIdentifierCondition, instanceID string, orgID *string) (*IDPOAzureAD, error)
GetGoogle(ctx context.Context, id IDPIdentifierCondition, instanceID string, orgID *string) (*IDPGoogle, error)
GetGithub(ctx context.Context, id IDPIdentifierCondition, instanceID string, orgID *string) (*IDPGithub, error)
}