mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: check if application is active in saml logic (#6003)
Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
2d13d412a2
commit
8dfaa1dfa5
@ -53,6 +53,9 @@ func (p *Storage) GetEntityByID(ctx context.Context, entityID string) (*servicep
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if app.State != domain.AppStateActive {
|
||||
return nil, errors.ThrowPreconditionFailed(nil, "SAML-sdaGg", "app is not active")
|
||||
}
|
||||
return serviceprovider.NewServiceProvider(
|
||||
app.ID,
|
||||
&serviceprovider.Config{
|
||||
@ -67,6 +70,9 @@ func (p *Storage) GetEntityIDByAppID(ctx context.Context, appID string) (string,
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if app.State != domain.AppStateActive {
|
||||
return "", errors.ThrowPreconditionFailed(nil, "SAML-sdaGg", "app is not active")
|
||||
}
|
||||
return app.SAMLConfig.EntityID, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user