mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-02 21:11:45 +00:00

# Which Problems Are Solved * Adds support for the service provider configuration SCIM v2 endpoints # How the Problems Are Solved * Adds support for the service provider configuration SCIM v2 endpoints * `GET /scim/v2/{orgId}/ServiceProviderConfig` * `GET /scim/v2/{orgId}/ResourceTypes` * `GET /scim/v2/{orgId}/ResourceTypes/{name}` * `GET /scim/v2/{orgId}/Schemas` * `GET /scim/v2/{orgId}/Schemas/{id}` # Additional Context Part of #8140 Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
24 lines
577 B
Go
24 lines
577 B
Go
package schemas
|
|
|
|
import "encoding/json"
|
|
|
|
// WriteOnlyString a write only string is not serializable to json.
|
|
// in the SCIM RFC it has a mutability of writeOnly.
|
|
// This increases security to really ensure this is never sent to a client.
|
|
type WriteOnlyString string
|
|
|
|
func (s *WriteOnlyString) MarshalJSON() ([]byte, error) {
|
|
return []byte("null"), nil
|
|
}
|
|
|
|
func (s *WriteOnlyString) UnmarshalJSON(bytes []byte) error {
|
|
var str string
|
|
err := json.Unmarshal(bytes, &str)
|
|
*s = WriteOnlyString(str)
|
|
return err
|
|
}
|
|
|
|
func (s *WriteOnlyString) String() string {
|
|
return string(*s)
|
|
}
|