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

This commit is contained in:
Iraq Jaber
2025-07-31 15:36:52 +01:00
parent 4f4ae3e6ea
commit bd35df9856
6 changed files with 324 additions and 122 deletions

View File

@@ -19,9 +19,9 @@ const (
IDPTypeLDAP
IDPTypeAzure
IDPTypeGithub
IDPTypeGitHubEnterprise
IDPTypeGitLab
IDPTypeGitLabSelfHosted
IDPTypeGithubEnterprise
IDPTypeGitlab
IDPTypeGitlabSelfHosted
IDPTypeGoogle
IDPTypeApple
IDPTypeSAML
@@ -164,6 +164,20 @@ type IDPGithub struct {
Github
}
type GithubEnterprise struct {
ClientID string `json:"clientId,omitempty"`
ClientSecret *crypto.CryptoValue `json:"clientSecret,omitempty"`
AuthorizationEndpoint string `json:"authorizationEndpoint,omitempty"`
TokenEndpoint string `json:"tokenEndpoint,omitempty"`
UserEndpoint string `json:"userEndpoint,omitempty"`
Scopes []string `json:"scopes,omitempty"`
}
type IDPGithubEnterprise struct {
*IdentityProvider
GithubEnterprise
}
// 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)
@@ -240,4 +254,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)
GetGithubEnterprise(ctx context.Context, id IDPIdentifierCondition, instanceID string, orgID *string) (*IDPGithubEnterprise, error)
}

View File

@@ -31,15 +31,15 @@ func _IDPTypeNoOp() {
_ = x[IDPTypeLDAP-(4)]
_ = x[IDPTypeAzure-(5)]
_ = x[IDPTypeGithub-(6)]
_ = x[IDPTypeGitHubEnterprise-(7)]
_ = x[IDPTypeGitLab-(8)]
_ = x[IDPTypeGitLabSelfHosted-(9)]
_ = x[IDPTypeGithubEnterprise-(7)]
_ = x[IDPTypeGitlab-(8)]
_ = x[IDPTypeGitlabSelfHosted-(9)]
_ = x[IDPTypeGoogle-(10)]
_ = x[IDPTypeApple-(11)]
_ = x[IDPTypeSAML-(12)]
}
var _IDPTypeValues = []IDPType{IDPTypeUnspecified, IDPTypeOIDC, IDPTypeJWT, IDPTypeOAuth, IDPTypeLDAP, IDPTypeAzure, IDPTypeGithub, IDPTypeGitHubEnterprise, IDPTypeGitLab, IDPTypeGitLabSelfHosted, IDPTypeGoogle, IDPTypeApple, IDPTypeSAML}
var _IDPTypeValues = []IDPType{IDPTypeUnspecified, IDPTypeOIDC, IDPTypeJWT, IDPTypeOAuth, IDPTypeLDAP, IDPTypeAzure, IDPTypeGithub, IDPTypeGithubEnterprise, IDPTypeGitlab, IDPTypeGitlabSelfHosted, IDPTypeGoogle, IDPTypeApple, IDPTypeSAML}
var _IDPTypeNameToValueMap = map[string]IDPType{
_IDPTypeName[0:11]: IDPTypeUnspecified,
@@ -56,12 +56,12 @@ var _IDPTypeNameToValueMap = map[string]IDPType{
_IDPTypeLowerName[27:32]: IDPTypeAzure,
_IDPTypeName[32:38]: IDPTypeGithub,
_IDPTypeLowerName[32:38]: IDPTypeGithub,
_IDPTypeName[38:54]: IDPTypeGitHubEnterprise,
_IDPTypeLowerName[38:54]: IDPTypeGitHubEnterprise,
_IDPTypeName[54:60]: IDPTypeGitLab,
_IDPTypeLowerName[54:60]: IDPTypeGitLab,
_IDPTypeName[60:76]: IDPTypeGitLabSelfHosted,
_IDPTypeLowerName[60:76]: IDPTypeGitLabSelfHosted,
_IDPTypeName[38:54]: IDPTypeGithubEnterprise,
_IDPTypeLowerName[38:54]: IDPTypeGithubEnterprise,
_IDPTypeName[54:60]: IDPTypeGitlab,
_IDPTypeLowerName[54:60]: IDPTypeGitlab,
_IDPTypeName[60:76]: IDPTypeGitlabSelfHosted,
_IDPTypeLowerName[60:76]: IDPTypeGitlabSelfHosted,
_IDPTypeName[76:82]: IDPTypeGoogle,
_IDPTypeLowerName[76:82]: IDPTypeGoogle,
_IDPTypeName[82:87]: IDPTypeApple,