mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-09 23:55:12 +00:00
feat(console): add and remove org domains, show userLoginNames (#235)
* org domains, user login names * switch user to userview, regen proto
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
UserProfile,
|
||||
UserProfileView,
|
||||
UserSessionViews,
|
||||
UserView,
|
||||
VerifyMfaOtp,
|
||||
VerifyMyUserEmailRequest,
|
||||
VerifyUserPhoneRequest} from './auth_pb';
|
||||
@@ -67,6 +68,13 @@ export class AuthServiceClient {
|
||||
response: UserSessionViews) => void
|
||||
): grpcWeb.ClientReadableStream<UserSessionViews>;
|
||||
|
||||
getMyUser(
|
||||
request: google_protobuf_empty_pb.Empty,
|
||||
metadata: grpcWeb.Metadata | undefined,
|
||||
callback: (err: grpcWeb.Error,
|
||||
response: UserView) => void
|
||||
): grpcWeb.ClientReadableStream<UserView>;
|
||||
|
||||
getMyUserProfile(
|
||||
request: google_protobuf_empty_pb.Empty,
|
||||
metadata: grpcWeb.Metadata | undefined,
|
||||
@@ -234,6 +242,11 @@ export class AuthServicePromiseClient {
|
||||
metadata?: grpcWeb.Metadata
|
||||
): Promise<UserSessionViews>;
|
||||
|
||||
getMyUser(
|
||||
request: google_protobuf_empty_pb.Empty,
|
||||
metadata?: grpcWeb.Metadata
|
||||
): Promise<UserView>;
|
||||
|
||||
getMyUserProfile(
|
||||
request: google_protobuf_empty_pb.Empty,
|
||||
metadata?: grpcWeb.Metadata
|
||||
|
||||
@@ -404,6 +404,86 @@ proto.caos.zitadel.auth.api.v1.AuthServicePromiseClient.prototype.getMyUserSessi
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.google.protobuf.Empty,
|
||||
* !proto.caos.zitadel.auth.api.v1.UserView>}
|
||||
*/
|
||||
const methodDescriptor_AuthService_GetMyUser = new grpc.web.MethodDescriptor(
|
||||
'/caos.zitadel.auth.api.v1.AuthService/GetMyUser',
|
||||
grpc.web.MethodType.UNARY,
|
||||
google_protobuf_empty_pb.Empty,
|
||||
proto.caos.zitadel.auth.api.v1.UserView,
|
||||
/**
|
||||
* @param {!proto.google.protobuf.Empty} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.caos.zitadel.auth.api.v1.UserView.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.AbstractClientBase.MethodInfo<
|
||||
* !proto.google.protobuf.Empty,
|
||||
* !proto.caos.zitadel.auth.api.v1.UserView>}
|
||||
*/
|
||||
const methodInfo_AuthService_GetMyUser = new grpc.web.AbstractClientBase.MethodInfo(
|
||||
proto.caos.zitadel.auth.api.v1.UserView,
|
||||
/**
|
||||
* @param {!proto.google.protobuf.Empty} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.caos.zitadel.auth.api.v1.UserView.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.google.protobuf.Empty} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.Error, ?proto.caos.zitadel.auth.api.v1.UserView)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.auth.api.v1.UserView>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.caos.zitadel.auth.api.v1.AuthServiceClient.prototype.getMyUser =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/caos.zitadel.auth.api.v1.AuthService/GetMyUser',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_AuthService_GetMyUser,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.google.protobuf.Empty} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.caos.zitadel.auth.api.v1.UserView>}
|
||||
* A native promise that resolves to the response
|
||||
*/
|
||||
proto.caos.zitadel.auth.api.v1.AuthServicePromiseClient.prototype.getMyUser =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/caos.zitadel.auth.api.v1.AuthService/GetMyUser',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_AuthService_GetMyUser);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
|
||||
+24
-22
@@ -47,6 +47,12 @@ export class UserSessionView extends jspb.Message {
|
||||
getSequence(): number;
|
||||
setSequence(value: number): void;
|
||||
|
||||
getLoginName(): string;
|
||||
setLoginName(value: string): void;
|
||||
|
||||
getDisplayName(): string;
|
||||
setDisplayName(value: string): void;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UserSessionView.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: UserSessionView): UserSessionView.AsObject;
|
||||
@@ -63,10 +69,12 @@ export namespace UserSessionView {
|
||||
userId: string,
|
||||
userName: string,
|
||||
sequence: number,
|
||||
loginName: string,
|
||||
displayName: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class User extends jspb.Message {
|
||||
export class UserView extends jspb.Message {
|
||||
getId(): string;
|
||||
setId(value: string): void;
|
||||
|
||||
@@ -78,11 +86,6 @@ export class User extends jspb.Message {
|
||||
hasCreationDate(): boolean;
|
||||
clearCreationDate(): void;
|
||||
|
||||
getActivationDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
||||
setActivationDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
|
||||
hasActivationDate(): boolean;
|
||||
clearActivationDate(): void;
|
||||
|
||||
getChangeDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
||||
setChangeDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
|
||||
hasChangeDate(): boolean;
|
||||
@@ -107,12 +110,12 @@ export class User extends jspb.Message {
|
||||
getLastName(): string;
|
||||
setLastName(value: string): void;
|
||||
|
||||
getNickName(): string;
|
||||
setNickName(value: string): void;
|
||||
|
||||
getDisplayName(): string;
|
||||
setDisplayName(value: string): void;
|
||||
|
||||
getNickName(): string;
|
||||
setNickName(value: string): void;
|
||||
|
||||
getPreferredLanguage(): string;
|
||||
setPreferredLanguage(value: string): void;
|
||||
|
||||
@@ -146,12 +149,12 @@ export class User extends jspb.Message {
|
||||
getStreetAddress(): string;
|
||||
setStreetAddress(value: string): void;
|
||||
|
||||
getPasswordChangeRequired(): boolean;
|
||||
setPasswordChangeRequired(value: boolean): void;
|
||||
|
||||
getSequence(): number;
|
||||
setSequence(value: number): void;
|
||||
|
||||
getResourceOwner(): string;
|
||||
setResourceOwner(value: string): void;
|
||||
|
||||
getLoginNamesList(): Array<string>;
|
||||
setLoginNamesList(value: Array<string>): void;
|
||||
clearLoginNamesList(): void;
|
||||
@@ -161,27 +164,26 @@ export class User extends jspb.Message {
|
||||
setPreferredLoginName(value: string): void;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): User.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: User): User.AsObject;
|
||||
static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): User;
|
||||
static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User;
|
||||
toObject(includeInstance?: boolean): UserView.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: UserView): UserView.AsObject;
|
||||
static serializeBinaryToWriter(message: UserView, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): UserView;
|
||||
static deserializeBinaryFromReader(message: UserView, reader: jspb.BinaryReader): UserView;
|
||||
}
|
||||
|
||||
export namespace User {
|
||||
export namespace UserView {
|
||||
export type AsObject = {
|
||||
id: string,
|
||||
state: UserState,
|
||||
creationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
||||
activationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
||||
changeDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
||||
lastLogin?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
||||
passwordChanged?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
||||
userName: string,
|
||||
firstName: string,
|
||||
lastName: string,
|
||||
nickName: string,
|
||||
displayName: string,
|
||||
nickName: string,
|
||||
preferredLanguage: string,
|
||||
gender: Gender,
|
||||
email: string,
|
||||
@@ -193,8 +195,8 @@ export namespace User {
|
||||
postalCode: string,
|
||||
region: string,
|
||||
streetAddress: string,
|
||||
passwordChangeRequired: boolean,
|
||||
sequence: number,
|
||||
resourceOwner: string,
|
||||
loginNamesList: Array<string>,
|
||||
preferredLoginName: string,
|
||||
}
|
||||
@@ -1215,7 +1217,7 @@ export enum OIDCResponseType {
|
||||
OIDCRESPONSETYPE_ID_TOKEN_TOKEN = 2,
|
||||
}
|
||||
export enum UserState {
|
||||
USERSTATE_UNSPECIEFIED = 0,
|
||||
USERSTATE_UNSPECIFIED = 0,
|
||||
USERSTATE_ACTIVE = 1,
|
||||
USERSTATE_INACTIVE = 2,
|
||||
USERSTATE_DELETED = 3,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6054,7 +6054,7 @@ proto.caos.zitadel.management.api.v1.UserView.toObject = function(includeInstanc
|
||||
sequence: jspb.Message.getFieldWithDefault(msg, 23, 0),
|
||||
resourceOwner: jspb.Message.getFieldWithDefault(msg, 24, ""),
|
||||
loginNamesList: jspb.Message.getRepeatedField(msg, 25),
|
||||
preferredLoginName: jspb.Message.getFieldWithDefault(msg, 27, "")
|
||||
preferredLoginName: jspb.Message.getFieldWithDefault(msg, 26, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -6195,7 +6195,7 @@ proto.caos.zitadel.management.api.v1.UserView.deserializeBinaryFromReader = func
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addLoginNames(value);
|
||||
break;
|
||||
case 27:
|
||||
case 26:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setPreferredLoginName(value);
|
||||
break;
|
||||
@@ -6410,7 +6410,7 @@ proto.caos.zitadel.management.api.v1.UserView.serializeBinaryToWriter = function
|
||||
f = message.getPreferredLoginName();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
27,
|
||||
26,
|
||||
f
|
||||
);
|
||||
}
|
||||
@@ -6886,17 +6886,17 @@ proto.caos.zitadel.management.api.v1.UserView.prototype.clearLoginNamesList = fu
|
||||
|
||||
|
||||
/**
|
||||
* optional string preferred_login_name = 27;
|
||||
* optional string preferred_login_name = 26;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.caos.zitadel.management.api.v1.UserView.prototype.getPreferredLoginName = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, ""));
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 26, ""));
|
||||
};
|
||||
|
||||
|
||||
/** @param {string} value */
|
||||
proto.caos.zitadel.management.api.v1.UserView.prototype.setPreferredLoginName = function(value) {
|
||||
jspb.Message.setProto3StringField(this, 27, value);
|
||||
jspb.Message.setProto3StringField(this, 26, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user