mirror of
https://github.com/storytold/irsa-manager.git
synced 2026-10-17 00:23:52 +00:00
secret deletion
This commit is contained in:
@@ -24,3 +24,21 @@ func Execute(ctx context.Context, factory OIDCIdPFactory) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Delete(ctx context.Context, factory OIDCIdPFactory) error {
|
||||
issuerMeta := factory.IssuerMeta()
|
||||
discovery := factory.IdPDiscovery()
|
||||
idp, err := factory.IdP(issuerMeta)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = discovery.DeleteStorage(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = idp.Delete(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user