oauth-wg / draft-ietf-oauth-status-list

https://drafts.oauth.net/draft-ietf-oauth-status-list/draft-ietf-oauth-status-list.html
Other
9 stars 7 forks source link

arbitrary size restrictions on status #52

Closed mprorock closed 5 days ago

mprorock commented 1 year ago

Is there a good reason to limit size to "Each status of a Referenced Token MUST be represented with a bit size of 1,2,4, or 8"

This can easily be resolved by setting a size parameter along side bits as suggested in #47

then you can easily seek to the bits you are after since you know the max size and the number of bits each status takes up

This also permits implementers to cover both cases where packing into 3 bits is desireable for space reasons, or have a large number of potential statuses to reflect

c2bo commented 1 year ago

This was mainly a choice for simplicity of implementation: by only allowing bit sizes of 1,2,4,8, we only need to manipulate a single byte in an array.

paulbastian commented 1 year ago

Optimisations for 3 bits are not worth it, as the expected number of usecases is negligible and the optimisation is not really worth it as the compression is still working well enough for 4 bits

paulbastian commented 1 year ago

todo: add design considerations to make implementations as simple as possible / pending close