mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-28 15:08:51 +00:00
feat: delete user scim v2 endpoint (#9151)
# Which Problems Are Solved
- Adds support for the user delete SCIM v2 endpoint
# How the Problems Are Solved
- Adds support for the user delete SCIM v2 endpoint under `DELETE
/scim/v2/{orgID}/Users/{id}`
# Additional Context
Part of #8140
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package scim
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
type AssertedScimError struct {
|
||||
Error *ScimError
|
||||
}
|
||||
|
||||
func RequireScimError(t require.TestingT, httpStatus int, err error) AssertedScimError {
|
||||
require.Error(t, err)
|
||||
|
||||
var scimErr *ScimError
|
||||
assert.True(t, errors.As(err, &scimErr))
|
||||
assert.Equal(t, strconv.Itoa(httpStatus), scimErr.Status)
|
||||
return AssertedScimError{scimErr} // wrap it, otherwise error handling is enforced
|
||||
}
|
||||
Reference in New Issue
Block a user