Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3332774
D12922.id42983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D12922.id42983.diff
View Options
diff --git a/services/identity/src/grpc_services/authenticated.rs b/services/identity/src/grpc_services/authenticated.rs
--- a/services/identity/src/grpc_services/authenticated.rs
+++ b/services/identity/src/grpc_services/authenticated.rs
@@ -877,6 +877,7 @@
let response = UserIdentitiesResponse {
identities: mapped_results,
+ reserved_user_identifiers: HashMap::new(),
};
return Ok(Response::new(response));
}
diff --git a/shared/protos/identity_auth.proto b/shared/protos/identity_auth.proto
--- a/shared/protos/identity_auth.proto
+++ b/shared/protos/identity_auth.proto
@@ -318,4 +318,7 @@
message UserIdentitiesResponse {
map<string, Identity> identities = 1;
+
+ // reserved usernames or wallet addresses
+ map<string, string> reserved_user_identifiers = 2;
}
diff --git a/web/protobufs/identity-auth-structs.cjs b/web/protobufs/identity-auth-structs.cjs
--- a/web/protobufs/identity-auth-structs.cjs
+++ b/web/protobufs/identity-auth-structs.cjs
@@ -5732,7 +5732,8 @@
*/
proto.identity.auth.UserIdentitiesResponse.toObject = function(includeInstance, msg) {
var f, obj = {
- identitiesMap: (f = msg.getIdentitiesMap()) ? f.toObject(includeInstance, proto.identity.auth.Identity.toObject) : []
+ identitiesMap: (f = msg.getIdentitiesMap()) ? f.toObject(includeInstance, proto.identity.auth.Identity.toObject) : [],
+ reservedUserIdentifiersMap: (f = msg.getReservedUserIdentifiersMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
@@ -5775,6 +5776,12 @@
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.identity.auth.Identity.deserializeBinaryFromReader, "", new proto.identity.auth.Identity());
});
break;
+ case 2:
+ var value = msg.getReservedUserIdentifiersMap();
+ reader.readMessage(value, function(message, reader) {
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
+ });
+ break;
default:
reader.skipField();
break;
@@ -5808,6 +5815,10 @@
if (f && f.getLength() > 0) {
f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.identity.auth.Identity.serializeBinaryToWriter);
}
+ f = message.getReservedUserIdentifiersMap(true);
+ if (f && f.getLength() > 0) {
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
+ }
};
@@ -5834,4 +5845,27 @@
};
+/**
+ * map<string, string> reserved_user_identifiers = 2;
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
+ * empty, instead returning `undefined`
+ * @return {!jspb.Map<string,string>}
+ */
+proto.identity.auth.UserIdentitiesResponse.prototype.getReservedUserIdentifiersMap = function(opt_noLazyCreate) {
+ return /** @type {!jspb.Map<string,string>} */ (
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
+ null));
+};
+
+
+/**
+ * Clears values from the map. The map will be non-null.
+ * @return {!proto.identity.auth.UserIdentitiesResponse} returns this
+ */
+proto.identity.auth.UserIdentitiesResponse.prototype.clearReservedUserIdentifiersMap = function() {
+ this.getReservedUserIdentifiersMap().clear();
+ return this;
+};
+
+
goog.object.extend(exports, proto.identity.auth);
diff --git a/web/protobufs/identity-auth-structs.cjs.flow b/web/protobufs/identity-auth-structs.cjs.flow
--- a/web/protobufs/identity-auth-structs.cjs.flow
+++ b/web/protobufs/identity-auth-structs.cjs.flow
@@ -618,9 +618,12 @@
}
declare export class UserIdentitiesResponse extends Message {
- getIdentitiesMap(): Map<string, Identity>;
+ getIdentitiesMap(): ProtoMap<string, Identity>;
clearIdentitiesMap(): UserIdentitiesResponse;
+ getReservedUserIdentifiersMap(): ProtoMap<string, string>;
+ clearReservedUserIdentifiersMap(): UserIdentitiesResponse;
+
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserIdentitiesResponseObject;
static toObject(includeInstance: boolean, msg: UserIdentitiesResponse): UserIdentitiesResponseObject;
@@ -631,4 +634,5 @@
export type UserIdentitiesResponseObject = {
identitiesMap: Array<[string, IdentityObject]>,
+ reservedUserIdentifiersMap: Array<[string, string]>,
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 1:37 AM (5 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2559319
Default Alt Text
D12922.id42983.diff (4 KB)
Attached To
Mode
D12922: [protos][identity] Add reserved usernames to UserIdentitiesResponse
Attached
Detach File
Event Timeline
Log In to Comment