simple static method

AuthMetadata simple(
  1. String username,
  2. String password
)

Implementation

static AuthMetadata simple(String username, String password) {
  var userNameU8Array = utf8.encode(username);
  var passwordU8Array = utf8.encode(password);
  var buffer = RSocketByteBuffer();
  buffer.writeI24(userNameU8Array.length);
  buffer.writeBytes(userNameU8Array);
  buffer.writeBytes(passwordU8Array);
  return AuthMetadata(0x00, buffer.toUint8Array());
}