ref: move Permission, Scope, Scopes to objectstore_types and use in Rust client#236
ref: move Permission, Scope, Scopes to objectstore_types and use in Rust client#236
Permission, Scope, Scopes to objectstore_types and use in Rust client#236Conversation
|
Responding to comments from the original PR description, these should all be sufficiently addressed.
Those are now two separate types. The only reason it was a single type is because they were in the same module and we didn't have to create a second struct. Those are simple view wrappers (a common Rust pattern), so there's no need to have them as one type.
The client API is rather intentional here and suggests a specific semantic data model. Maybe we should rename
This is a limitation of structured scopes we can accept. We could also write them directly into a string and then parse it on-demand when we build the token, but I'm not sure this is worth the complexity. If we truly cause a performance issue through these allocations, we can still optimize without breaking the API.
Fixed by using a view wrapper .
Not part of this PR.
Reverted. The |
Signing tokens in the client requires structured scope information which we currently don't have. We have a structured scope type in
objectstore_servicealready so this PR moves that type toobjectstore_typesand integrates it into the Rust client.As a driveby, it also moves the
Permissiontype in preparation for the actual token signing impl.