mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 14:47:33 +00:00
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! added first event
This commit is contained in:
@@ -129,8 +129,7 @@ func (i *idProvider) GetOIDC(ctx context.Context, id domain.IDPIdentifierConditi
|
||||
}
|
||||
|
||||
if idpOIDC.Type != domain.IDPTypeOIDC.String() {
|
||||
// TODO
|
||||
return nil, nil
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeOIDC, idpOIDC.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpOIDC.Payload), idpOIDC)
|
||||
@@ -151,8 +150,7 @@ func (i *idProvider) GetJWT(ctx context.Context, id domain.IDPIdentifierConditio
|
||||
}
|
||||
|
||||
if idpJWT.Type != domain.IDPTypeJWT.String() {
|
||||
// TODO
|
||||
return nil, nil
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeJWT, idpJWT.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpJWT.Payload), idpJWT)
|
||||
@@ -173,8 +171,7 @@ func (i *idProvider) GetOAuth(ctx context.Context, id domain.IDPIdentifierCondit
|
||||
}
|
||||
|
||||
if idpOAuth.Type != domain.IDPTypeOAuth.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeOAuth, idpOAuth.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpOAuth.Payload), idpOAuth)
|
||||
@@ -195,8 +192,7 @@ func (i *idProvider) GetOAzureAD(ctx context.Context, id domain.IDPIdentifierCon
|
||||
}
|
||||
|
||||
if idpAzure.Type != domain.IDPTypeAzure.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeAzure, idpAzure.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpAzure.Payload), idpAzure)
|
||||
@@ -217,8 +213,7 @@ func (i *idProvider) GetGoogle(ctx context.Context, id domain.IDPIdentifierCondi
|
||||
}
|
||||
|
||||
if idpGoogle.Type != domain.IDPTypeGoogle.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeGoogle, idpGoogle.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpGoogle.Payload), idpGoogle)
|
||||
@@ -239,8 +234,7 @@ func (i *idProvider) GetGithub(ctx context.Context, id domain.IDPIdentifierCondi
|
||||
}
|
||||
|
||||
if idpGithub.Type != domain.IDPTypeGitHub.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeGitHub, idpGithub.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpGithub.Payload), idpGithub)
|
||||
@@ -261,8 +255,7 @@ func (i *idProvider) GetGithubEnterprise(ctx context.Context, id domain.IDPIdent
|
||||
}
|
||||
|
||||
if idpGithubEnterprise.Type != domain.IDPTypeGitHubEnterprise.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeGitHubEnterprise, idpGithubEnterprise.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpGithubEnterprise.Payload), idpGithubEnterprise)
|
||||
@@ -283,8 +276,7 @@ func (i *idProvider) GetGitlab(ctx context.Context, id domain.IDPIdentifierCondi
|
||||
}
|
||||
|
||||
if idpGitlab.Type != domain.IDPTypeGitLab.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeGitLab, idpGitlab.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpGitlab.Payload), idpGitlab)
|
||||
@@ -305,8 +297,7 @@ func (i *idProvider) GetGitlabSelfHosting(ctx context.Context, id domain.IDPIden
|
||||
}
|
||||
|
||||
if idpGitlabSelfHosting.Type != domain.IDPTypeGitLabSelfHosted.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeGitLabSelfHosted, idpGitlabSelfHosting.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*idpGitlabSelfHosting.Payload), idpGitlabSelfHosting)
|
||||
@@ -327,8 +318,7 @@ func (i *idProvider) GetLDAP(ctx context.Context, id domain.IDPIdentifierConditi
|
||||
}
|
||||
|
||||
if ldap.Type != domain.IDPTypeLDAP.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeLDAP, ldap.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*ldap.Payload), ldap)
|
||||
@@ -349,8 +339,7 @@ func (i *idProvider) GetApple(ctx context.Context, id domain.IDPIdentifierCondit
|
||||
}
|
||||
|
||||
if apple.Type != domain.IDPTypeApple.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeApple, apple.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*apple.Payload), apple)
|
||||
@@ -371,8 +360,7 @@ func (i *idProvider) GetSAML(ctx context.Context, id domain.IDPIdentifierConditi
|
||||
}
|
||||
|
||||
if saml.Type != domain.IDPTypeSAML.String() {
|
||||
// TODO
|
||||
return nil, errors.New("WRONG TYPE")
|
||||
return nil, domain.NewWrongTypeError(domain.IDPTypeSAML, saml.Type)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(*saml.Payload), saml)
|
||||
|
Reference in New Issue
Block a user