yaal-coop / scim2-models

SCIM resources serialization and validation with Pydantic
https://scim2-models.readthedocs.io
Apache License 2.0
10 stars 2 forks source link

Base64 serialization of binary fields #31

Open azmeuk opened 3 months ago

azmeuk commented 3 months ago

RFC7643 §2.3.6 indicates that binary fields should be encoded in base64.

The attribute value MUST be base64 encoded as
   specified in [Section 4 of [RFC4648]](https://datatracker.ietf.org/doc/html/rfc4648#section-4).  In cases where a URL-safe
   encoding is required, the attribute definition MAY specify that
   base64 URL encoding be used as per [Section 5 of [RFC4648]](https://datatracker.ietf.org/doc/html/rfc4648#section-5).  Unless
   otherwise specified in the attribute definition, trailing padding
   characters MAY be omitted ("=").

There should be validators and serializers for that.