Summary
Payload provides the ability to access the metadata and the data, but users cannot read these values without knowing the corresponding mime types. Payload should contain the mime types so users can read the metadata and data values.
Background
I'm working on RSocket & Spring Security support. I’d like to create an RSocketInterceptor to wrap the RSocket with security concerns (authentication / authorization). For this to work security will need to be able to read the Payload. For example, security will need to read the metadata to get credentials for authentication. It will also need to get the metadata to get the route information to perform authorization based logic.
How should I read the Payload metadata from inside an RSocket implementation so security can perform authentication and authorization. The problem I'm having is that while the RSocket API exposes the Payload which contains the metadata, it does not appear to expose the metadataMimeType (or the dataMimeType).
Spring creates a SocketAcceptor (RSocketMessageHandler) which obtains the Mime Types from the ConnectionSetupPayload. It then ensures that the RSocket it creates has a reference to the mime types. I don't think it makes sense for someone implementing RSocketInterceptor to have to also implement and wrap downstream SocketAcceptor to get the mimetypes for metadata and data.
Summary
Payload provides the ability to access the metadata and the data, but users cannot read these values without knowing the corresponding mime types. Payload should contain the mime types so users can read the metadata and data values.
Background
I'm working on RSocket & Spring Security support. I’d like to create an RSocketInterceptor to wrap the RSocket with security concerns (authentication / authorization). For this to work security will need to be able to read the Payload. For example, security will need to read the metadata to get credentials for authentication. It will also need to get the metadata to get the route information to perform authorization based logic.
How should I read the Payload metadata from inside an RSocket implementation so security can perform authentication and authorization. The problem I'm having is that while the RSocket API exposes the Payload which contains the metadata, it does not appear to expose the metadataMimeType (or the dataMimeType).
Spring creates a SocketAcceptor (RSocketMessageHandler) which obtains the Mime Types from the ConnectionSetupPayload. It then ensures that the RSocket it creates has a reference to the mime types. I don't think it makes sense for someone implementing RSocketInterceptor to have to also implement and wrap downstream SocketAcceptor to get the mimetypes for metadata and data.