feat: SMS and email OTP texts (#6281)

* manage 2 custom texts proto

* implement methods

* default texts

* console

* improve translations

* lint

* test: fix e2e timeout

* fix translations

* add missing console translations

* remove unused text parts

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Elio Bischof 2023-08-09 07:49:12 +02:00 committed by GitHub
parent 9aed9f9186
commit 343a9428b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 1508 additions and 188 deletions

View File

@ -37,8 +37,8 @@
[chips]="chips[currentType]" [chips]="chips[currentType]"
[disabled]="(canWrite$ | async) === false" [disabled]="(canWrite$ | async) === false"
label="one" label="one"
[default$]="getDefaultInitMessageTextMap$" [default$]="getDefaultMessageTextMap$"
[current$]="getCustomInitMessageTextMap$" [current$]="getCustomMessageTextMap$"
(changedValues)="updateCurrentValues($event)" (changedValues)="updateCurrentValues($event)"
></cnsl-edit-text> ></cnsl-edit-text>
</div> </div>
@ -46,7 +46,7 @@
<div class="message-text-actions"> <div class="message-text-actions">
<button <button
class="reset-button" class="reset-button"
*ngIf="(getCustomInitMessageTextMap$ | async) && (getCustomInitMessageTextMap$ | async)?.['isDefault'] === false" *ngIf="(getCustomMessageTextMap$ | async) && (getCustomMessageTextMap$ | async)?.['isDefault'] === false"
[disabled]="(canWrite$ | async) === false" [disabled]="(canWrite$ | async) === false"
(click)="resetDefault()" (click)="resetDefault()"
color="message-text-warn" color="message-text-warn"

View File

@ -9,14 +9,18 @@ import {
GetDefaultPasswordlessRegistrationMessageTextRequest as AdminGetDefaultPasswordlessRegistrationMessageTextRequest, GetDefaultPasswordlessRegistrationMessageTextRequest as AdminGetDefaultPasswordlessRegistrationMessageTextRequest,
GetDefaultPasswordResetMessageTextRequest as AdminGetDefaultPasswordResetMessageTextRequest, GetDefaultPasswordResetMessageTextRequest as AdminGetDefaultPasswordResetMessageTextRequest,
GetDefaultVerifyEmailMessageTextRequest as AdminGetDefaultVerifyEmailMessageTextRequest, GetDefaultVerifyEmailMessageTextRequest as AdminGetDefaultVerifyEmailMessageTextRequest,
GetDefaultVerifyEmailOTPMessageTextRequest as AdminGetDefaultVerifyEmailOTPMessageTextRequest,
GetDefaultVerifyPhoneMessageTextRequest as AdminGetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextRequest as AdminGetDefaultVerifyPhoneMessageTextRequest,
GetDefaultVerifySMSOTPMessageTextRequest as AdminGetDefaultVerifySMSOTPMessageTextRequest,
SetDefaultDomainClaimedMessageTextRequest, SetDefaultDomainClaimedMessageTextRequest,
SetDefaultInitMessageTextRequest, SetDefaultInitMessageTextRequest,
SetDefaultPasswordChangeMessageTextRequest, SetDefaultPasswordChangeMessageTextRequest,
SetDefaultPasswordlessRegistrationMessageTextRequest, SetDefaultPasswordlessRegistrationMessageTextRequest,
SetDefaultPasswordResetMessageTextRequest, SetDefaultPasswordResetMessageTextRequest,
SetDefaultVerifyEmailMessageTextRequest, SetDefaultVerifyEmailMessageTextRequest,
SetDefaultVerifyEmailOTPMessageTextRequest,
SetDefaultVerifyPhoneMessageTextRequest, SetDefaultVerifyPhoneMessageTextRequest,
SetDefaultVerifySMSOTPMessageTextRequest,
} from 'src/app/proto/generated/zitadel/admin_pb'; } from 'src/app/proto/generated/zitadel/admin_pb';
import { import {
GetCustomDomainClaimedMessageTextRequest, GetCustomDomainClaimedMessageTextRequest,
@ -25,21 +29,27 @@ import {
GetCustomPasswordlessRegistrationMessageTextRequest, GetCustomPasswordlessRegistrationMessageTextRequest,
GetCustomPasswordResetMessageTextRequest, GetCustomPasswordResetMessageTextRequest,
GetCustomVerifyEmailMessageTextRequest, GetCustomVerifyEmailMessageTextRequest,
GetCustomVerifyEmailOTPMessageTextRequest,
GetCustomVerifyPhoneMessageTextRequest, GetCustomVerifyPhoneMessageTextRequest,
GetCustomVerifySMSOTPMessageTextRequest,
GetDefaultDomainClaimedMessageTextRequest, GetDefaultDomainClaimedMessageTextRequest,
GetDefaultInitMessageTextRequest, GetDefaultInitMessageTextRequest,
GetDefaultPasswordChangeMessageTextRequest, GetDefaultPasswordChangeMessageTextRequest,
GetDefaultPasswordlessRegistrationMessageTextRequest, GetDefaultPasswordlessRegistrationMessageTextRequest,
GetDefaultPasswordResetMessageTextRequest, GetDefaultPasswordResetMessageTextRequest,
GetDefaultVerifyEmailMessageTextRequest, GetDefaultVerifyEmailMessageTextRequest,
GetDefaultVerifyEmailOTPMessageTextRequest,
GetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextRequest,
GetDefaultVerifySMSOTPMessageTextRequest,
SetCustomDomainClaimedMessageTextRequest, SetCustomDomainClaimedMessageTextRequest,
SetCustomInitMessageTextRequest, SetCustomInitMessageTextRequest,
SetCustomPasswordChangeMessageTextRequest, SetCustomPasswordChangeMessageTextRequest,
SetCustomPasswordlessRegistrationMessageTextRequest, SetCustomPasswordlessRegistrationMessageTextRequest,
SetCustomPasswordResetMessageTextRequest, SetCustomPasswordResetMessageTextRequest,
SetCustomVerifyEmailMessageTextRequest, SetCustomVerifyEmailMessageTextRequest,
SetCustomVerifyEmailOTPMessageTextRequest,
SetCustomVerifyPhoneMessageTextRequest, SetCustomVerifyPhoneMessageTextRequest,
SetCustomVerifySMSOTPMessageTextRequest,
} from 'src/app/proto/generated/zitadel/management_pb'; } from 'src/app/proto/generated/zitadel/management_pb';
import { MessageCustomText } from 'src/app/proto/generated/zitadel/text_pb'; import { MessageCustomText } from 'src/app/proto/generated/zitadel/text_pb';
import { AdminService } from 'src/app/services/admin.service'; import { AdminService } from 'src/app/services/admin.service';
@ -60,6 +70,8 @@ enum MESSAGETYPES {
DOMAINCLAIMED = 'DC', DOMAINCLAIMED = 'DC',
PASSWORDLESS = 'PL', PASSWORDLESS = 'PL',
PASSWORDCHANGE = 'PC', PASSWORDCHANGE = 'PC',
VERIFYSMSOTP = 'VSO',
VERIFYEMAILOTP = 'VEO',
} }
const REQUESTMAP = { const REQUESTMAP = {
@ -132,6 +144,33 @@ const REQUESTMAP = {
return req; return req;
}, },
}, },
[MESSAGETYPES.VERIFYSMSOTP]: {
get: new GetCustomVerifySMSOTPMessageTextRequest(),
set: new SetCustomVerifySMSOTPMessageTextRequest(),
getDefault: new GetDefaultVerifySMSOTPMessageTextRequest(),
setFcn: (map: Partial<MessageCustomText.AsObject>): SetCustomVerifySMSOTPMessageTextRequest => {
const req = new SetCustomVerifySMSOTPMessageTextRequest();
req.setText(map.text ?? '');
return req;
},
},
[MESSAGETYPES.VERIFYEMAILOTP]: {
get: new GetCustomVerifyEmailOTPMessageTextRequest(),
set: new SetCustomVerifyEmailOTPMessageTextRequest(),
getDefault: new GetDefaultVerifyEmailOTPMessageTextRequest(),
setFcn: (map: Partial<MessageCustomText.AsObject>): SetCustomVerifyEmailOTPMessageTextRequest => {
const req = new SetCustomVerifyEmailOTPMessageTextRequest();
req.setFooterText(map.footerText ?? '');
req.setGreeting(map.greeting ?? '');
req.setPreHeader(map.preHeader ?? '');
req.setSubject(map.subject ?? '');
req.setText(map.text ?? '');
req.setTitle(map.title ?? '');
return req;
},
},
[MESSAGETYPES.PASSWORDRESET]: { [MESSAGETYPES.PASSWORDRESET]: {
get: new GetCustomPasswordResetMessageTextRequest(), get: new GetCustomPasswordResetMessageTextRequest(),
set: new SetCustomPasswordResetMessageTextRequest(), set: new SetCustomPasswordResetMessageTextRequest(),
@ -255,6 +294,31 @@ const REQUESTMAP = {
return req; return req;
}, },
}, },
[MESSAGETYPES.VERIFYSMSOTP]: {
get: new AdminGetDefaultVerifySMSOTPMessageTextRequest(),
set: new SetDefaultVerifySMSOTPMessageTextRequest(),
setFcn: (map: Partial<MessageCustomText.AsObject>): SetDefaultVerifySMSOTPMessageTextRequest => {
const req = new SetDefaultVerifySMSOTPMessageTextRequest();
req.setText(map.text ?? '');
return req;
},
},
[MESSAGETYPES.VERIFYEMAILOTP]: {
get: new AdminGetDefaultVerifyEmailOTPMessageTextRequest(),
set: new SetDefaultVerifyEmailOTPMessageTextRequest(),
setFcn: (map: Partial<MessageCustomText.AsObject>): SetDefaultVerifyEmailOTPMessageTextRequest => {
const req = new SetDefaultVerifyEmailOTPMessageTextRequest();
req.setFooterText(map.footerText ?? '');
req.setGreeting(map.greeting ?? '');
req.setPreHeader(map.preHeader ?? '');
req.setSubject(map.subject ?? '');
req.setText(map.text ?? '');
req.setTitle(map.title ?? '');
return req;
},
},
[MESSAGETYPES.PASSWORDRESET]: { [MESSAGETYPES.PASSWORDRESET]: {
get: new AdminGetDefaultPasswordResetMessageTextRequest(), get: new AdminGetDefaultPasswordResetMessageTextRequest(),
set: new SetDefaultPasswordResetMessageTextRequest(), set: new SetDefaultPasswordResetMessageTextRequest(),
@ -318,8 +382,8 @@ const REQUESTMAP = {
}) })
export class MessageTextsComponent implements OnInit, OnDestroy { export class MessageTextsComponent implements OnInit, OnDestroy {
public loading: boolean = false; public loading: boolean = false;
public getDefaultInitMessageTextMap$: Observable<{ [key: string]: string }> = of({}); public getDefaultMessageTextMap$: Observable<{ [key: string]: string }> = of({});
public getCustomInitMessageTextMap$: BehaviorSubject<{ [key: string]: string | boolean }> = new BehaviorSubject({}); // boolean because of isDefault public getCustomMessageTextMap$: BehaviorSubject<{ [key: string]: string | boolean }> = new BehaviorSubject({}); // boolean because of isDefault
public currentType: MESSAGETYPES = MESSAGETYPES.INIT; public currentType: MESSAGETYPES = MESSAGETYPES.INIT;
@ -329,7 +393,7 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
public MESSAGETYPES: any = MESSAGETYPES; public MESSAGETYPES: any = MESSAGETYPES;
public updateRequest!: SetCustomInitMessageTextRequest | SetDefaultInitMessageTextRequest; public updateRequest!: any;
public InfoSectionType: any = InfoSectionType; public InfoSectionType: any = InfoSectionType;
public chips: { public chips: {
@ -411,6 +475,38 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
], ],
[MESSAGETYPES.VERIFYSMSOTP]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.otp', value: '{{.OTP}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifyUrl', value: '{{.VerifyURL}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
[MESSAGETYPES.VERIFYEMAILOTP]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.otp', value: '{{.OTP}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifyUrl', value: '{{.VerifyURL}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.nickName', value: '{{.NickName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.displayName', value: '{{.DisplayName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastEmail', value: '{{.LastEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedEmail', value: '{{.VerifiedEmail}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastPhone', value: '{{.LastPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.verifiedPhone', value: '{{.VerifiedPhone}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.loginnames', value: '{{.LoginNames}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.changedate', value: '{{.ChangeDate}}' },
],
[MESSAGETYPES.PASSWORDLESS]: [ [MESSAGETYPES.PASSWORDLESS]: [
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' },
{ key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' }, { key: 'POLICY.MESSAGE_TEXTS.CHIPS.username', value: '{{.UserName}}' },
@ -481,64 +577,48 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
public getDefaultValues(type: MESSAGETYPES, req: any): Promise<any> { public getDefaultValues(type: MESSAGETYPES, req: any): Promise<any> {
switch (type) { switch (type) {
case MESSAGETYPES.INIT: case MESSAGETYPES.INIT:
return this.stripDetails(this.service.getDefaultInitMessageText(req)); return this.stripEmail(this.service.getDefaultInitMessageText(req));
case MESSAGETYPES.VERIFYPHONE:
return this.stripDetails(this.service.getDefaultVerifyPhoneMessageText(req));
case MESSAGETYPES.VERIFYEMAIL: case MESSAGETYPES.VERIFYEMAIL:
return this.stripDetails(this.service.getDefaultVerifyEmailMessageText(req)); return this.stripEmail(this.service.getDefaultVerifyEmailMessageText(req));
case MESSAGETYPES.VERIFYPHONE:
return this.stripSMS(this.service.getDefaultVerifyPhoneMessageText(req));
case MESSAGETYPES.VERIFYSMSOTP:
return this.stripSMS(this.service.getDefaultVerifySMSOTPMessageText(req));
case MESSAGETYPES.VERIFYEMAILOTP:
return this.stripEmail(this.service.getDefaultVerifyEmailOTPMessageText(req));
case MESSAGETYPES.PASSWORDRESET: case MESSAGETYPES.PASSWORDRESET:
return this.stripDetails(this.service.getDefaultPasswordResetMessageText(req)); return this.stripEmail(this.service.getDefaultPasswordResetMessageText(req));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
return this.stripDetails(this.service.getDefaultDomainClaimedMessageText(req)); return this.stripEmail(this.service.getDefaultDomainClaimedMessageText(req));
case MESSAGETYPES.PASSWORDLESS: case MESSAGETYPES.PASSWORDLESS:
return this.stripDetails(this.service.getDefaultPasswordlessRegistrationMessageText(req)); return this.stripEmail(this.service.getDefaultPasswordlessRegistrationMessageText(req));
case MESSAGETYPES.PASSWORDCHANGE: case MESSAGETYPES.PASSWORDCHANGE:
return this.stripDetails(this.service.getDefaultPasswordChangeMessageText(req)); return this.stripEmail(this.service.getDefaultPasswordChangeMessageText(req));
} }
} }
public getCurrentValues(type: MESSAGETYPES, req: any): Promise<any> | undefined { public getCurrentValues(type: MESSAGETYPES, req: any): Promise<any> | undefined {
if (this.serviceType === PolicyComponentServiceType.MGMT) { switch (type) {
switch (type) { case MESSAGETYPES.INIT:
case MESSAGETYPES.INIT: return this.stripEmail(this.service.getCustomInitMessageText(req));
return this.stripDetails((this.service as ManagementService).getCustomInitMessageText(req)); case MESSAGETYPES.VERIFYEMAIL:
case MESSAGETYPES.VERIFYPHONE: return this.stripEmail(this.service.getCustomVerifyEmailMessageText(req));
return this.stripDetails((this.service as ManagementService).getCustomVerifyPhoneMessageText(req)); case MESSAGETYPES.VERIFYPHONE:
case MESSAGETYPES.VERIFYEMAIL: return this.stripSMS(this.service.getCustomVerifyPhoneMessageText(req));
return this.stripDetails((this.service as ManagementService).getCustomVerifyEmailMessageText(req)); case MESSAGETYPES.VERIFYSMSOTP:
case MESSAGETYPES.PASSWORDRESET: return this.stripSMS(this.service.getCustomVerifySMSOTPMessageText(req));
return this.stripDetails((this.service as ManagementService).getCustomPasswordResetMessageText(req)); case MESSAGETYPES.VERIFYEMAILOTP:
case MESSAGETYPES.DOMAINCLAIMED: return this.stripEmail(this.service.getCustomVerifyEmailOTPMessageText(req));
return this.stripDetails((this.service as ManagementService).getCustomDomainClaimedMessageText(req)); case MESSAGETYPES.PASSWORDRESET:
case MESSAGETYPES.PASSWORDLESS: return this.stripEmail(this.service.getCustomPasswordResetMessageText(req));
return this.stripDetails((this.service as ManagementService).getCustomPasswordlessRegistrationMessageText(req)); case MESSAGETYPES.DOMAINCLAIMED:
case MESSAGETYPES.PASSWORDCHANGE: return this.stripEmail(this.service.getCustomDomainClaimedMessageText(req));
return this.stripDetails((this.service as ManagementService).getCustomPasswordChangeMessageText(req)); case MESSAGETYPES.PASSWORDLESS:
return this.stripEmail(this.service.getCustomPasswordlessRegistrationMessageText(req));
default: case MESSAGETYPES.PASSWORDCHANGE:
return undefined; return this.stripEmail(this.service.getCustomPasswordChangeMessageText(req));
} default:
} else if (this.serviceType === PolicyComponentServiceType.ADMIN) { return undefined;
switch (type) {
case MESSAGETYPES.INIT:
return this.stripDetails((this.service as AdminService).getCustomInitMessageText(req));
case MESSAGETYPES.VERIFYPHONE:
return this.stripDetails((this.service as AdminService).getCustomVerifyPhoneMessageText(req));
case MESSAGETYPES.VERIFYEMAIL:
return this.stripDetails((this.service as AdminService).getCustomVerifyEmailMessageText(req));
case MESSAGETYPES.PASSWORDRESET:
return this.stripDetails((this.service as AdminService).getCustomPasswordResetMessageText(req));
case MESSAGETYPES.DOMAINCLAIMED:
return this.stripDetails((this.service as AdminService).getCustomDomainClaimedMessageText(req));
case MESSAGETYPES.PASSWORDLESS:
return this.stripDetails((this.service as AdminService).getCustomPasswordlessRegistrationMessageText(req));
case MESSAGETYPES.PASSWORDCHANGE:
return this.stripDetails((this.service as AdminService).getCustomPasswordChangeMessageText(req));
default:
return undefined;
}
} else {
return undefined;
} }
} }
@ -552,7 +632,7 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
const reqDefaultInit = REQUESTMAP[this.serviceType][type].getDefault; const reqDefaultInit = REQUESTMAP[this.serviceType][type].getDefault;
reqDefaultInit.setLanguage(this.locale); reqDefaultInit.setLanguage(this.locale);
this.getDefaultInitMessageTextMap$ = from(this.getDefaultValues(type, reqDefaultInit)); this.getDefaultMessageTextMap$ = from(this.getDefaultValues(type, reqDefaultInit));
} }
const reqCustomInit = REQUESTMAP[this.serviceType][type].get.setLanguage(this.locale); const reqCustomInit = REQUESTMAP[this.serviceType][type].get.setLanguage(this.locale);
@ -560,7 +640,7 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
return this.getCurrentValues(type, reqCustomInit) return this.getCurrentValues(type, reqCustomInit)
?.then((data) => { ?.then((data) => {
this.loading = false; this.loading = false;
this.getCustomInitMessageTextMap$.next(data); this.getCustomMessageTextMap$.next(data);
}) })
.catch((error) => { .catch((error) => {
this.loading = false; this.loading = false;
@ -587,10 +667,14 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
switch (this.currentType) { switch (this.currentType) {
case MESSAGETYPES.INIT: case MESSAGETYPES.INIT:
return handler((this.service as ManagementService).setCustomInitMessageText(this.updateRequest)); return handler((this.service as ManagementService).setCustomInitMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYPHONE:
return handler((this.service as ManagementService).setCustomVerifyPhoneMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYEMAIL: case MESSAGETYPES.VERIFYEMAIL:
return handler((this.service as ManagementService).setCustomVerifyEmailMessageText(this.updateRequest)); return handler((this.service as ManagementService).setCustomVerifyEmailMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYPHONE:
return handler((this.service as ManagementService).setCustomVerifyPhoneMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYSMSOTP:
return handler((this.service as ManagementService).setCustomVerifySMSOTPMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYEMAILOTP:
return handler((this.service as ManagementService).setCustomVerifyEmailOTPMessageText(this.updateRequest));
case MESSAGETYPES.PASSWORDRESET: case MESSAGETYPES.PASSWORDRESET:
return handler((this.service as ManagementService).setCustomPasswordResetMessageText(this.updateRequest)); return handler((this.service as ManagementService).setCustomPasswordResetMessageText(this.updateRequest));
case MESSAGETYPES.DOMAINCLAIMED: case MESSAGETYPES.DOMAINCLAIMED:
@ -608,6 +692,10 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
return handler((this.service as AdminService).setDefaultInitMessageText(this.updateRequest)); return handler((this.service as AdminService).setDefaultInitMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYPHONE: case MESSAGETYPES.VERIFYPHONE:
return handler((this.service as AdminService).setDefaultVerifyPhoneMessageText(this.updateRequest)); return handler((this.service as AdminService).setDefaultVerifyPhoneMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYSMSOTP:
return handler((this.service as AdminService).setDefaultVerifySMSOTPMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYEMAILOTP:
return handler((this.service as AdminService).setDefaultVerifyEmailOTPMessageText(this.updateRequest));
case MESSAGETYPES.VERIFYEMAIL: case MESSAGETYPES.VERIFYEMAIL:
return handler((this.service as AdminService).setDefaultVerifyEmailMessageText(this.updateRequest)); return handler((this.service as AdminService).setDefaultVerifyEmailMessageText(this.updateRequest));
case MESSAGETYPES.PASSWORDRESET: case MESSAGETYPES.PASSWORDRESET:
@ -635,55 +723,68 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
}); });
dialogRef.afterClosed().subscribe((resp) => { dialogRef.afterClosed().subscribe((resp) => {
if (resp && this.serviceType === PolicyComponentServiceType.MGMT) { if (!resp) {
const handler = (prom: Promise<any>): Promise<any> => {
return prom
.then(() => {
setTimeout(() => {
this.loadData(this.currentType);
}, 1000);
})
.catch((error) => {
this.toast.showError(error);
});
};
switch (this.currentType) {
case MESSAGETYPES.INIT:
return handler((this.service as ManagementService).resetCustomInitMessageTextToDefault(this.locale));
case MESSAGETYPES.VERIFYPHONE:
return handler((this.service as ManagementService).resetCustomVerifyPhoneMessageTextToDefault(this.locale));
case MESSAGETYPES.VERIFYEMAIL:
return handler((this.service as ManagementService).resetCustomVerifyEmailMessageTextToDefault(this.locale));
case MESSAGETYPES.PASSWORDRESET:
return handler((this.service as ManagementService).resetCustomPasswordResetMessageTextToDefault(this.locale));
case MESSAGETYPES.DOMAINCLAIMED:
return handler((this.service as ManagementService).resetCustomDomainClaimedMessageTextToDefault(this.locale));
case MESSAGETYPES.DOMAINCLAIMED:
return handler(
(this.service as ManagementService).resetCustomPasswordlessRegistrationMessageTextToDefault(this.locale),
);
case MESSAGETYPES.PASSWORDCHANGE:
return handler((this.service as ManagementService).resetCustomPasswordChangeMessageTextToDefault(this.locale));
default:
return Promise.reject();
}
} else {
return Promise.reject(); return Promise.reject();
} }
const handler = (prom: Promise<any>): Promise<any> => {
return prom
.then(() => {
setTimeout(() => {
this.loadData(this.currentType);
}, 1000);
})
.catch((error) => {
this.toast.showError(error);
});
};
switch (this.currentType) {
case MESSAGETYPES.INIT:
return handler(this.service.resetCustomInitMessageTextToDefault(this.locale));
case MESSAGETYPES.VERIFYPHONE:
return handler(this.service.resetCustomVerifyPhoneMessageTextToDefault(this.locale));
case MESSAGETYPES.VERIFYSMSOTP:
return handler(this.service.resetCustomVerifySMSOTPMessageTextToDefault(this.locale));
case MESSAGETYPES.VERIFYEMAILOTP:
return handler(this.service.resetCustomVerifyEmailOTPMessageTextToDefault(this.locale));
case MESSAGETYPES.VERIFYEMAIL:
return handler(this.service.resetCustomVerifyEmailMessageTextToDefault(this.locale));
case MESSAGETYPES.PASSWORDRESET:
return handler(this.service.resetCustomPasswordResetMessageTextToDefault(this.locale));
case MESSAGETYPES.DOMAINCLAIMED:
return handler(this.service.resetCustomDomainClaimedMessageTextToDefault(this.locale));
case MESSAGETYPES.PASSWORDLESS:
return handler(this.service.resetCustomPasswordlessRegistrationMessageTextToDefault(this.locale));
case MESSAGETYPES.PASSWORDCHANGE:
return handler(this.service.resetCustomPasswordChangeMessageTextToDefault(this.locale));
default:
return Promise.reject();
}
}); });
} }
private stripDetails(prom: Promise<any>): Promise<any> { private strip(prom: Promise<any>, properties: Array<string>): Promise<any> {
return prom.then((res) => { return prom.then((res) => {
if (res.customText) { if (res.customText) {
delete res.customText.details; properties.forEach((property) => {
delete res.customText[property];
});
return Object.assign({}, res.customText as unknown as { [key: string]: string }); return Object.assign({}, res.customText as unknown as { [key: string]: string });
} else { } else {
return {}; return {};
} }
}); });
} }
private stripEmail(prom: Promise<any>): Promise<any> {
return this.strip(prom, ['details']);
}
private stripSMS(prom: Promise<any>): Promise<any> {
return this.strip(prom, ['details', 'buttonText', 'footerText', 'greeting', 'preHeader', 'subject', 'title']);
}
public ngOnDestroy(): void { public ngOnDestroy(): void {
this.sub.unsubscribe(); this.sub.unsubscribe();
} }

View File

@ -66,8 +66,12 @@ import {
GetCustomPasswordResetMessageTextResponse, GetCustomPasswordResetMessageTextResponse,
GetCustomVerifyEmailMessageTextRequest, GetCustomVerifyEmailMessageTextRequest,
GetCustomVerifyEmailMessageTextResponse, GetCustomVerifyEmailMessageTextResponse,
GetCustomVerifyEmailOTPMessageTextRequest,
GetCustomVerifyEmailOTPMessageTextResponse,
GetCustomVerifyPhoneMessageTextRequest, GetCustomVerifyPhoneMessageTextRequest,
GetCustomVerifyPhoneMessageTextResponse, GetCustomVerifyPhoneMessageTextResponse,
GetCustomVerifySMSOTPMessageTextRequest,
GetCustomVerifySMSOTPMessageTextResponse,
GetDefaultDomainClaimedMessageTextRequest, GetDefaultDomainClaimedMessageTextRequest,
GetDefaultDomainClaimedMessageTextResponse, GetDefaultDomainClaimedMessageTextResponse,
GetDefaultInitMessageTextRequest, GetDefaultInitMessageTextRequest,
@ -84,8 +88,12 @@ import {
GetDefaultPasswordResetMessageTextResponse, GetDefaultPasswordResetMessageTextResponse,
GetDefaultVerifyEmailMessageTextRequest, GetDefaultVerifyEmailMessageTextRequest,
GetDefaultVerifyEmailMessageTextResponse, GetDefaultVerifyEmailMessageTextResponse,
GetDefaultVerifyEmailOTPMessageTextRequest,
GetDefaultVerifyEmailOTPMessageTextResponse,
GetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextRequest,
GetDefaultVerifyPhoneMessageTextResponse, GetDefaultVerifyPhoneMessageTextResponse,
GetDefaultVerifySMSOTPMessageTextRequest,
GetDefaultVerifySMSOTPMessageTextResponse,
GetDomainPolicyRequest, GetDomainPolicyRequest,
GetDomainPolicyResponse, GetDomainPolicyResponse,
GetFileSystemNotificationProviderRequest, GetFileSystemNotificationProviderRequest,
@ -196,8 +204,12 @@ import {
SetDefaultPasswordResetMessageTextResponse, SetDefaultPasswordResetMessageTextResponse,
SetDefaultVerifyEmailMessageTextRequest, SetDefaultVerifyEmailMessageTextRequest,
SetDefaultVerifyEmailMessageTextResponse, SetDefaultVerifyEmailMessageTextResponse,
SetDefaultVerifyEmailOTPMessageTextRequest,
SetDefaultVerifyEmailOTPMessageTextResponse,
SetDefaultVerifyPhoneMessageTextRequest, SetDefaultVerifyPhoneMessageTextRequest,
SetDefaultVerifyPhoneMessageTextResponse, SetDefaultVerifyPhoneMessageTextResponse,
SetDefaultVerifySMSOTPMessageTextRequest,
SetDefaultVerifySMSOTPMessageTextResponse,
SetSecurityPolicyRequest, SetSecurityPolicyRequest,
SetSecurityPolicyResponse, SetSecurityPolicyResponse,
SetUpOrgRequest, SetUpOrgRequest,
@ -256,6 +268,26 @@ import {
UpdateSMTPConfigResponse, UpdateSMTPConfigResponse,
} from '../proto/generated/zitadel/admin_pb'; } from '../proto/generated/zitadel/admin_pb';
import { Event } from '../proto/generated/zitadel/event_pb'; import { Event } from '../proto/generated/zitadel/event_pb';
import {
ResetCustomDomainClaimedMessageTextToDefaultRequest,
ResetCustomDomainClaimedMessageTextToDefaultResponse,
ResetCustomInitMessageTextToDefaultRequest,
ResetCustomInitMessageTextToDefaultResponse,
ResetCustomPasswordChangeMessageTextToDefaultRequest,
ResetCustomPasswordChangeMessageTextToDefaultResponse,
ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest,
ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse,
ResetCustomPasswordResetMessageTextToDefaultRequest,
ResetCustomPasswordResetMessageTextToDefaultResponse,
ResetCustomVerifyEmailMessageTextToDefaultRequest,
ResetCustomVerifyEmailMessageTextToDefaultResponse,
ResetCustomVerifyEmailOTPMessageTextToDefaultRequest,
ResetCustomVerifyEmailOTPMessageTextToDefaultResponse,
ResetCustomVerifyPhoneMessageTextToDefaultRequest,
ResetCustomVerifyPhoneMessageTextToDefaultResponse,
ResetCustomVerifySMSOTPMessageTextToDefaultRequest,
ResetCustomVerifySMSOTPMessageTextToDefaultResponse,
} from '../proto/generated/zitadel/management_pb';
import { SearchQuery } from '../proto/generated/zitadel/member_pb'; import { SearchQuery } from '../proto/generated/zitadel/member_pb';
import { ListQuery } from '../proto/generated/zitadel/object_pb'; import { ListQuery } from '../proto/generated/zitadel/object_pb';
import { GrpcService } from './grpc.service'; import { GrpcService } from './grpc.service';
@ -415,6 +447,12 @@ export class AdminService {
return this.grpcService.admin.getCustomInitMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.admin.getCustomInitMessageText(req, null).then((resp) => resp.toObject());
} }
public resetCustomInitMessageTextToDefault(lang: string): Promise<ResetCustomInitMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomInitMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomInitMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public setDefaultInitMessageText( public setDefaultInitMessageText(
req: SetDefaultInitMessageTextRequest, req: SetDefaultInitMessageTextRequest,
): Promise<SetDefaultInitMessageTextResponse.AsObject> { ): Promise<SetDefaultInitMessageTextResponse.AsObject> {
@ -439,6 +477,14 @@ export class AdminService {
return this.grpcService.admin.setDefaultVerifyEmailMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.admin.setDefaultVerifyEmailMessageText(req, null).then((resp) => resp.toObject());
} }
public resetCustomVerifyEmailMessageTextToDefault(
lang: string,
): Promise<ResetCustomVerifyEmailMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomVerifyEmailMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomVerifyEmailMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultVerifyPhoneMessageText( public getDefaultVerifyPhoneMessageText(
req: GetDefaultVerifyPhoneMessageTextRequest, req: GetDefaultVerifyPhoneMessageTextRequest,
): Promise<GetDefaultVerifyPhoneMessageTextResponse.AsObject> { ): Promise<GetDefaultVerifyPhoneMessageTextResponse.AsObject> {
@ -457,6 +503,66 @@ export class AdminService {
return this.grpcService.admin.setDefaultVerifyPhoneMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.admin.setDefaultVerifyPhoneMessageText(req, null).then((resp) => resp.toObject());
} }
public resetCustomVerifyPhoneMessageTextToDefault(
lang: string,
): Promise<ResetCustomVerifyPhoneMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomVerifyPhoneMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomVerifyPhoneMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultVerifySMSOTPMessageText(
req: GetDefaultVerifySMSOTPMessageTextRequest,
): Promise<GetDefaultVerifySMSOTPMessageTextResponse.AsObject> {
return this.grpcService.admin.getDefaultVerifySMSOTPMessageText(req, null).then((resp) => resp.toObject());
}
public getCustomVerifySMSOTPMessageText(
req: GetCustomVerifySMSOTPMessageTextRequest,
): Promise<GetCustomVerifySMSOTPMessageTextResponse.AsObject> {
return this.grpcService.admin.getCustomVerifySMSOTPMessageText(req, null).then((resp) => resp.toObject());
}
public setDefaultVerifySMSOTPMessageText(
req: SetDefaultVerifySMSOTPMessageTextRequest,
): Promise<SetDefaultVerifySMSOTPMessageTextResponse.AsObject> {
return this.grpcService.admin.setDefaultVerifySMSOTPMessageText(req, null).then((resp) => resp.toObject());
}
public resetCustomVerifySMSOTPMessageTextToDefault(
lang: string,
): Promise<ResetCustomVerifySMSOTPMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomVerifySMSOTPMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomVerifySMSOTPMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultVerifyEmailOTPMessageText(
req: GetDefaultVerifyEmailOTPMessageTextRequest,
): Promise<GetDefaultVerifyEmailOTPMessageTextResponse.AsObject> {
return this.grpcService.admin.getDefaultVerifyEmailOTPMessageText(req, null).then((resp) => resp.toObject());
}
public getCustomVerifyEmailOTPMessageText(
req: GetCustomVerifyEmailOTPMessageTextRequest,
): Promise<GetCustomVerifyEmailOTPMessageTextResponse.AsObject> {
return this.grpcService.admin.getCustomVerifyEmailOTPMessageText(req, null).then((resp) => resp.toObject());
}
public setDefaultVerifyEmailOTPMessageText(
req: SetDefaultVerifyEmailOTPMessageTextRequest,
): Promise<SetDefaultVerifyEmailOTPMessageTextResponse.AsObject> {
return this.grpcService.admin.setDefaultVerifyEmailOTPMessageText(req, null).then((resp) => resp.toObject());
}
public resetCustomVerifyEmailOTPMessageTextToDefault(
lang: string,
): Promise<ResetCustomVerifyEmailOTPMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomVerifyEmailOTPMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomVerifyEmailOTPMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultPasswordResetMessageText( public getDefaultPasswordResetMessageText(
req: GetDefaultPasswordResetMessageTextRequest, req: GetDefaultPasswordResetMessageTextRequest,
): Promise<GetDefaultPasswordResetMessageTextResponse.AsObject> { ): Promise<GetDefaultPasswordResetMessageTextResponse.AsObject> {
@ -475,6 +581,14 @@ export class AdminService {
return this.grpcService.admin.setDefaultPasswordResetMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.admin.setDefaultPasswordResetMessageText(req, null).then((resp) => resp.toObject());
} }
public resetCustomPasswordResetMessageTextToDefault(
lang: string,
): Promise<ResetCustomPasswordResetMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomPasswordResetMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomPasswordResetMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultDomainClaimedMessageText( public getDefaultDomainClaimedMessageText(
req: GetDefaultDomainClaimedMessageTextRequest, req: GetDefaultDomainClaimedMessageTextRequest,
): Promise<GetDefaultDomainClaimedMessageTextResponse.AsObject> { ): Promise<GetDefaultDomainClaimedMessageTextResponse.AsObject> {
@ -493,6 +607,14 @@ export class AdminService {
return this.grpcService.admin.setDefaultDomainClaimedMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.admin.setDefaultDomainClaimedMessageText(req, null).then((resp) => resp.toObject());
} }
public resetCustomDomainClaimedMessageTextToDefault(
lang: string,
): Promise<ResetCustomDomainClaimedMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomDomainClaimedMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomDomainClaimedMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultPasswordlessRegistrationMessageText( public getDefaultPasswordlessRegistrationMessageText(
req: GetDefaultPasswordlessRegistrationMessageTextRequest, req: GetDefaultPasswordlessRegistrationMessageTextRequest,
): Promise<GetDefaultPasswordlessRegistrationMessageTextResponse.AsObject> { ): Promise<GetDefaultPasswordlessRegistrationMessageTextResponse.AsObject> {
@ -511,6 +633,16 @@ export class AdminService {
return this.grpcService.admin.setDefaultPasswordlessRegistrationMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.admin.setDefaultPasswordlessRegistrationMessageText(req, null).then((resp) => resp.toObject());
} }
public resetCustomPasswordlessRegistrationMessageTextToDefault(
lang: string,
): Promise<ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin
.resetCustomPasswordlessRegistrationMessageTextToDefault(req, null)
.then((resp) => resp.toObject());
}
public getDefaultPasswordChangeMessageText( public getDefaultPasswordChangeMessageText(
req: GetDefaultPasswordChangeMessageTextRequest, req: GetDefaultPasswordChangeMessageTextRequest,
): Promise<GetDefaultPasswordChangeMessageTextResponse.AsObject> { ): Promise<GetDefaultPasswordChangeMessageTextResponse.AsObject> {
@ -529,6 +661,14 @@ export class AdminService {
return this.grpcService.admin.setDefaultPasswordChangeMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.admin.setDefaultPasswordChangeMessageText(req, null).then((resp) => resp.toObject());
} }
public resetCustomPasswordChangeMessageTextToDefault(
lang: string,
): Promise<ResetCustomPasswordChangeMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomPasswordChangeMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.admin.resetCustomPasswordChangeMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public SetUpOrg(org: SetUpOrgRequest.Org, human: SetUpOrgRequest.Human): Promise<SetUpOrgResponse.AsObject> { public SetUpOrg(org: SetUpOrgRequest.Org, human: SetUpOrgRequest.Human): Promise<SetUpOrgResponse.AsObject> {
const req = new SetUpOrgRequest(); const req = new SetUpOrgRequest();

View File

@ -135,8 +135,12 @@ import {
GetCustomPasswordResetMessageTextResponse, GetCustomPasswordResetMessageTextResponse,
GetCustomVerifyEmailMessageTextRequest, GetCustomVerifyEmailMessageTextRequest,
GetCustomVerifyEmailMessageTextResponse, GetCustomVerifyEmailMessageTextResponse,
GetCustomVerifyEmailOTPMessageTextRequest,
GetCustomVerifyEmailOTPMessageTextResponse,
GetCustomVerifyPhoneMessageTextRequest, GetCustomVerifyPhoneMessageTextRequest,
GetCustomVerifyPhoneMessageTextResponse, GetCustomVerifyPhoneMessageTextResponse,
GetCustomVerifySMSOTPMessageTextRequest,
GetCustomVerifySMSOTPMessageTextResponse,
GetDefaultDomainClaimedMessageTextRequest, GetDefaultDomainClaimedMessageTextRequest,
GetDefaultDomainClaimedMessageTextResponse, GetDefaultDomainClaimedMessageTextResponse,
GetDefaultInitMessageTextRequest, GetDefaultInitMessageTextRequest,
@ -155,8 +159,12 @@ import {
GetDefaultPasswordResetMessageTextResponse, GetDefaultPasswordResetMessageTextResponse,
GetDefaultVerifyEmailMessageTextRequest, GetDefaultVerifyEmailMessageTextRequest,
GetDefaultVerifyEmailMessageTextResponse, GetDefaultVerifyEmailMessageTextResponse,
GetDefaultVerifyEmailOTPMessageTextRequest,
GetDefaultVerifyEmailOTPMessageTextResponse,
GetDefaultVerifyPhoneMessageTextRequest, GetDefaultVerifyPhoneMessageTextRequest,
GetDefaultVerifyPhoneMessageTextResponse, GetDefaultVerifyPhoneMessageTextResponse,
GetDefaultVerifySMSOTPMessageTextRequest,
GetDefaultVerifySMSOTPMessageTextResponse,
GetDomainPolicyRequest, GetDomainPolicyRequest,
GetDomainPolicyResponse, GetDomainPolicyResponse,
GetFlowRequest, GetFlowRequest,
@ -375,8 +383,12 @@ import {
ResetCustomPasswordResetMessageTextToDefaultResponse, ResetCustomPasswordResetMessageTextToDefaultResponse,
ResetCustomVerifyEmailMessageTextToDefaultRequest, ResetCustomVerifyEmailMessageTextToDefaultRequest,
ResetCustomVerifyEmailMessageTextToDefaultResponse, ResetCustomVerifyEmailMessageTextToDefaultResponse,
ResetCustomVerifyEmailOTPMessageTextToDefaultRequest,
ResetCustomVerifyEmailOTPMessageTextToDefaultResponse,
ResetCustomVerifyPhoneMessageTextToDefaultRequest, ResetCustomVerifyPhoneMessageTextToDefaultRequest,
ResetCustomVerifyPhoneMessageTextToDefaultResponse, ResetCustomVerifyPhoneMessageTextToDefaultResponse,
ResetCustomVerifySMSOTPMessageTextToDefaultRequest,
ResetCustomVerifySMSOTPMessageTextToDefaultResponse,
ResetLabelPolicyToDefaultRequest, ResetLabelPolicyToDefaultRequest,
ResetLabelPolicyToDefaultResponse, ResetLabelPolicyToDefaultResponse,
ResetLockoutPolicyToDefaultRequest, ResetLockoutPolicyToDefaultRequest,
@ -408,8 +420,12 @@ import {
SetCustomPasswordResetMessageTextResponse, SetCustomPasswordResetMessageTextResponse,
SetCustomVerifyEmailMessageTextRequest, SetCustomVerifyEmailMessageTextRequest,
SetCustomVerifyEmailMessageTextResponse, SetCustomVerifyEmailMessageTextResponse,
SetCustomVerifyEmailOTPMessageTextRequest,
SetCustomVerifyEmailOTPMessageTextResponse,
SetCustomVerifyPhoneMessageTextRequest, SetCustomVerifyPhoneMessageTextRequest,
SetCustomVerifyPhoneMessageTextResponse, SetCustomVerifyPhoneMessageTextResponse,
SetCustomVerifySMSOTPMessageTextRequest,
SetCustomVerifySMSOTPMessageTextResponse,
SetHumanInitialPasswordRequest, SetHumanInitialPasswordRequest,
SetOrgMetadataRequest, SetOrgMetadataRequest,
SetOrgMetadataResponse, SetOrgMetadataResponse,
@ -620,6 +636,58 @@ export class ManagementService {
return this.grpcService.mgmt.resetCustomVerifyPhoneMessageTextToDefault(req, null).then((resp) => resp.toObject()); return this.grpcService.mgmt.resetCustomVerifyPhoneMessageTextToDefault(req, null).then((resp) => resp.toObject());
} }
public getDefaultVerifySMSOTPMessageText(
req: GetDefaultVerifySMSOTPMessageTextRequest,
): Promise<GetDefaultVerifySMSOTPMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getDefaultVerifySMSOTPMessageText(req, null).then((resp) => resp.toObject());
}
public getCustomVerifySMSOTPMessageText(
req: GetCustomVerifySMSOTPMessageTextRequest,
): Promise<GetCustomVerifySMSOTPMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getCustomVerifySMSOTPMessageText(req, null).then((resp) => resp.toObject());
}
public setCustomVerifySMSOTPMessageText(
req: SetCustomVerifySMSOTPMessageTextRequest,
): Promise<SetCustomVerifySMSOTPMessageTextResponse.AsObject> {
return this.grpcService.mgmt.setCustomVerifySMSOTPMessageText(req, null).then((resp) => resp.toObject());
}
public resetCustomVerifySMSOTPMessageTextToDefault(
lang: string,
): Promise<ResetCustomVerifySMSOTPMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomVerifySMSOTPMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.mgmt.resetCustomVerifySMSOTPMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultVerifyEmailOTPMessageText(
req: GetDefaultVerifyEmailOTPMessageTextRequest,
): Promise<GetDefaultVerifyEmailOTPMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getDefaultVerifyEmailOTPMessageText(req, null).then((resp) => resp.toObject());
}
public getCustomVerifyEmailOTPMessageText(
req: GetCustomVerifyEmailOTPMessageTextRequest,
): Promise<GetCustomVerifyEmailOTPMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getCustomVerifyEmailOTPMessageText(req, null).then((resp) => resp.toObject());
}
public setCustomVerifyEmailOTPMessageText(
req: SetCustomVerifyEmailOTPMessageTextRequest,
): Promise<SetCustomVerifyEmailOTPMessageTextResponse.AsObject> {
return this.grpcService.mgmt.setCustomVerifyEmailOTPMessageText(req, null).then((resp) => resp.toObject());
}
public resetCustomVerifyEmailOTPMessageTextToDefault(
lang: string,
): Promise<ResetCustomVerifyEmailOTPMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomVerifyEmailOTPMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.mgmt.resetCustomVerifyEmailOTPMessageTextToDefault(req, null).then((resp) => resp.toObject());
}
public getDefaultPasswordResetMessageText( public getDefaultPasswordResetMessageText(
req: GetDefaultPasswordResetMessageTextRequest, req: GetDefaultPasswordResetMessageTextRequest,
): Promise<GetDefaultPasswordResetMessageTextResponse.AsObject> { ): Promise<GetDefaultPasswordResetMessageTextResponse.AsObject> {
@ -678,6 +746,30 @@ export class ManagementService {
return this.grpcService.mgmt.getDefaultPasswordlessRegistrationMessageText(req, null).then((resp) => resp.toObject()); return this.grpcService.mgmt.getDefaultPasswordlessRegistrationMessageText(req, null).then((resp) => resp.toObject());
} }
public getCustomPasswordlessRegistrationMessageText(
req: GetCustomPasswordlessRegistrationMessageTextRequest,
): Promise<GetCustomPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getCustomPasswordlessRegistrationMessageText(req, null).then((resp) => resp.toObject());
}
public setCustomPasswordlessRegistrationMessageCustomText(
req: SetCustomPasswordlessRegistrationMessageTextRequest,
): Promise<SetCustomPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.mgmt
.setCustomPasswordlessRegistrationMessageCustomText(req, null)
.then((resp) => resp.toObject());
}
public resetCustomPasswordlessRegistrationMessageTextToDefault(
lang: string,
): Promise<ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.mgmt
.resetCustomPasswordlessRegistrationMessageTextToDefault(req, null)
.then((resp) => resp.toObject());
}
public getDefaultPasswordChangeMessageText( public getDefaultPasswordChangeMessageText(
req: GetDefaultPasswordChangeMessageTextRequest, req: GetDefaultPasswordChangeMessageTextRequest,
): Promise<GetDefaultPasswordChangeMessageTextResponse.AsObject> { ): Promise<GetDefaultPasswordChangeMessageTextResponse.AsObject> {
@ -704,30 +796,6 @@ export class ManagementService {
return this.grpcService.mgmt.resetCustomPasswordChangeMessageTextToDefault(req, null).then((resp) => resp.toObject()); return this.grpcService.mgmt.resetCustomPasswordChangeMessageTextToDefault(req, null).then((resp) => resp.toObject());
} }
public getCustomPasswordlessRegistrationMessageText(
req: GetCustomPasswordlessRegistrationMessageTextRequest,
): Promise<GetCustomPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.mgmt.getCustomPasswordlessRegistrationMessageText(req, null).then((resp) => resp.toObject());
}
public setCustomPasswordlessRegistrationMessageCustomText(
req: SetCustomPasswordlessRegistrationMessageTextRequest,
): Promise<SetCustomPasswordlessRegistrationMessageTextResponse.AsObject> {
return this.grpcService.mgmt
.setCustomPasswordlessRegistrationMessageCustomText(req, null)
.then((resp) => resp.toObject());
}
public resetCustomPasswordlessRegistrationMessageTextToDefault(
lang: string,
): Promise<ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse.AsObject> {
const req = new ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest();
req.setLanguage(lang);
return this.grpcService.mgmt
.resetCustomPasswordlessRegistrationMessageTextToDefault(req, null)
.then((resp) => resp.toObject());
}
public updateUserName(userId: string, username: string): Promise<UpdateUserNameResponse.AsObject> { public updateUserName(userId: string, username: string): Promise<UpdateUserNameResponse.AsObject> {
const req = new UpdateUserNameRequest(); const req = new UpdateUserNameRequest();
req.setUserId(userId); req.setUserId(userId);

View File

@ -1287,6 +1287,8 @@
"INIT": "Инициализация", "INIT": "Инициализация",
"VE": "Потвърди Имейл", "VE": "Потвърди Имейл",
"VP": "Потвърдете телефона", "VP": "Потвърдете телефона",
"VSO": "Проверка на SMS OTP",
"VEO": "Проверка на електронна поща OTP",
"PR": "Нулиране на парола", "PR": "Нулиране на парола",
"DC": "Заявка за домейн", "DC": "Заявка за домейн",
"PL": "Без парола", "PL": "Без парола",
@ -1307,7 +1309,9 @@
"verifiedPhone": "Потвърден телефон", "verifiedPhone": "Потвърден телефон",
"changedate": "Промяна на датата", "changedate": "Промяна на датата",
"username": "Потребителско име", "username": "Потребителско име",
"tempUsername": "Временно потребителско име" "tempUsername": "Временно потребителско име",
"otp": "Еднократна парола",
"verifyUrl": "URL за потвърждаване на еднократна парола"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Персонализираните текстове са запазени." "UPDATED": "Персонализираните текстове са запазени."

View File

@ -1293,6 +1293,8 @@
"INIT": "Initialisierung", "INIT": "Initialisierung",
"VE": "Emailverifikation", "VE": "Emailverifikation",
"VP": "Telefonnummerverifikation", "VP": "Telefonnummerverifikation",
"VSO": "SMS-OTP überprüfen",
"VEO": "E-Mail-OTP überprüfen",
"PR": "Passwort Wiederherstellung", "PR": "Passwort Wiederherstellung",
"DC": "Domainbeanspruchung", "DC": "Domainbeanspruchung",
"PL": "Passwortlos", "PL": "Passwortlos",
@ -1313,7 +1315,9 @@
"verifiedPhone": "Verifizierte Telefonnummer", "verifiedPhone": "Verifizierte Telefonnummer",
"changedate": "Änderungsdatum", "changedate": "Änderungsdatum",
"username": "Username", "username": "Username",
"tempUsername": "Temp. Username" "tempUsername": "Temp. Username",
"otp": "Einmalpasswort",
"verifyUrl": "URL zur Überprüfung des Einmalpassworts"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Benutzerdefinierte Texte gespeichert." "UPDATED": "Benutzerdefinierte Texte gespeichert."

View File

@ -1294,6 +1294,8 @@
"INIT": "Initialization", "INIT": "Initialization",
"VE": "Verify Email", "VE": "Verify Email",
"VP": "Verify Phone", "VP": "Verify Phone",
"VSO": "Verify SMS OTP",
"VEO": "Verify Email OTP",
"PR": "Password Reset", "PR": "Password Reset",
"DC": "Domain Claim", "DC": "Domain Claim",
"PL": "Passwordless", "PL": "Passwordless",
@ -1314,7 +1316,9 @@
"verifiedPhone": "Verified phone", "verifiedPhone": "Verified phone",
"changedate": "Change date", "changedate": "Change date",
"username": "Username", "username": "Username",
"tempUsername": "Temp username" "tempUsername": "Temp username",
"otp": "One-time password",
"verifyUrl": "Verify One-time-password URL"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Custom Texts saved." "UPDATED": "Custom Texts saved."

View File

@ -1294,6 +1294,8 @@
"INIT": "Inicialización", "INIT": "Inicialización",
"VE": "Verificación de email", "VE": "Verificación de email",
"VP": "Verificación de teléfono", "VP": "Verificación de teléfono",
"VSO": "Verificar OTP de SMS",
"VEO": "Verificar OTP de correo electrónico",
"PR": "Restablecimiento de contraseña", "PR": "Restablecimiento de contraseña",
"DC": "Reclamar un dominio", "DC": "Reclamar un dominio",
"PL": "Acceso sin contraseña", "PL": "Acceso sin contraseña",
@ -1314,7 +1316,9 @@
"verifiedPhone": "Teléfono verificado", "verifiedPhone": "Teléfono verificado",
"changedate": "Cambiar fecha", "changedate": "Cambiar fecha",
"username": "Nombre de usuario", "username": "Nombre de usuario",
"tempUsername": "Nombre de usuario temporal" "tempUsername": "Nombre de usuario temporal",
"otp": "Contraseña de un solo uso",
"verifyUrl": "URL para verificar la contraseña de un solo uso"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Textos personalizados guardados." "UPDATED": "Textos personalizados guardados."

View File

@ -1293,6 +1293,8 @@
"INIT": "Initialisation", "INIT": "Initialisation",
"VE": "Vérifier l'email", "VE": "Vérifier l'email",
"VP": "Vérifier le téléphone", "VP": "Vérifier le téléphone",
"VSO": "Vérifier SMS OTP",
"VEO": "Vérifier l'OTP par courrier électronique",
"PR": "Réinitialisation du mot de passe", "PR": "Réinitialisation du mot de passe",
"DC": "Réclamation de domaine", "DC": "Réclamation de domaine",
"PL": "Sans mot de passe", "PL": "Sans mot de passe",
@ -1313,7 +1315,9 @@
"verifiedPhone": "Téléphone vérifié", "verifiedPhone": "Téléphone vérifié",
"changedate": "Date de changement", "changedate": "Date de changement",
"username": "Nom d'utilisateur", "username": "Nom d'utilisateur",
"tempUsername": "Nom d'utilisateur temporaire" "tempUsername": "Nom d'utilisateur temporaire",
"otp": "Mot de passe à usage unique",
"verifyUrl": "URL pour vérifier le mot de passe à usage unique"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Textes personnalisés enregistrés." "UPDATED": "Textes personnalisés enregistrés."

View File

@ -1293,6 +1293,8 @@
"INIT": "Inizializzazione", "INIT": "Inizializzazione",
"VE": "Verificazione l'e-mail", "VE": "Verificazione l'e-mail",
"VP": "Verificazione del telefono", "VP": "Verificazione del telefono",
"VSO": "Verifica OTP SMS",
"VEO": "Verifica OTP Email",
"PR": "Ripristino della password", "PR": "Ripristino della password",
"DC": "Rivendicazione del dominio", "DC": "Rivendicazione del dominio",
"PL": "Autenticazione Passwordless", "PL": "Autenticazione Passwordless",
@ -1313,7 +1315,9 @@
"verifiedPhone": "Telefono verificato", "verifiedPhone": "Telefono verificato",
"changedate": "Cambia data", "changedate": "Cambia data",
"username": "Nome utente", "username": "Nome utente",
"tempUsername": "Nome utente temporaneo" "tempUsername": "Nome utente temporaneo",
"otp": "Password monouso",
"verifyUrl": "URL per verificare la password monouso"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Testi personalizzati salvati." "UPDATED": "Testi personalizzati salvati."

View File

@ -1289,6 +1289,8 @@
"INIT": "初期セットアップ", "INIT": "初期セットアップ",
"VE": "メールの認証", "VE": "メールの認証",
"VP": "電話番号の認証", "VP": "電話番号の認証",
"VSO": "SMS OTPを確認する",
"VEO": "メールOTPを確認する",
"PR": "パスワードのリセット", "PR": "パスワードのリセット",
"DC": "ドメインクレーム", "DC": "ドメインクレーム",
"PL": "パスワードレス", "PL": "パスワードレス",
@ -1309,7 +1311,9 @@
"verifiedPhone": "認証済みの電話番号", "verifiedPhone": "認証済みの電話番号",
"changedate": "変更日", "changedate": "変更日",
"username": "ユーザー名", "username": "ユーザー名",
"tempUsername": "一時ユーザー名" "tempUsername": "一時ユーザー名",
"otp": "ワンタイムパスワード",
"verifyUrl": "ワンタイムパスワードを確認するURL"
}, },
"TOAST": { "TOAST": {
"UPDATED": "カスタムテキストが保存されました。" "UPDATED": "カスタムテキストが保存されました。"

View File

@ -1294,6 +1294,8 @@
"INIT": "Иницијализација", "INIT": "Иницијализација",
"VE": "Верификација на е-пошта", "VE": "Верификација на е-пошта",
"VP": "Верификација на телефонски број", "VP": "Верификација на телефонски број",
"VSO": "Провери SMS OTP",
"VEO": "Провери Email OTP",
"PR": "Ресетирање на лозинка", "PR": "Ресетирање на лозинка",
"DC": "Зафатница на домен", "DC": "Зафатница на домен",
"PL": "Лозинка без лозинка", "PL": "Лозинка без лозинка",
@ -1314,7 +1316,9 @@
"verifiedPhone": "Верифициран телефонски број", "verifiedPhone": "Верифициран телефонски број",
"changedate": "Датум на промена", "changedate": "Датум на промена",
"username": "Корисничко име", "username": "Корисничко име",
"tempUsername": "Привремено корисничко име" "tempUsername": "Привремено корисничко име",
"otp": "Еднократна лозинка",
"verifyUrl": "URL за потврдување на еднократна лозинка"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Прилагодените текстови се зачувани." "UPDATED": "Прилагодените текстови се зачувани."

View File

@ -1293,6 +1293,8 @@
"INIT": "Inicjalizacja", "INIT": "Inicjalizacja",
"VE": "Weryfikacja e-mail", "VE": "Weryfikacja e-mail",
"VP": "Weryfikacja telefonu", "VP": "Weryfikacja telefonu",
"VSO": "Zweryfikuj SMS OTP",
"VEO": "Zweryfikuj Email OTP",
"PR": "Resetowanie hasła", "PR": "Resetowanie hasła",
"DC": "Rejestracja domeny", "DC": "Rejestracja domeny",
"PL": "Bez hasła", "PL": "Bez hasła",
@ -1313,7 +1315,9 @@
"verifiedPhone": "Zweryfikowany telefon", "verifiedPhone": "Zweryfikowany telefon",
"changedate": "Data zmiany", "changedate": "Data zmiany",
"username": "Nazwa użytkownika", "username": "Nazwa użytkownika",
"tempUsername": "Tymczasowa nazwa użytkownika" "tempUsername": "Tymczasowa nazwa użytkownika",
"otp": "Hasło jednorazowe",
"verifyUrl": "URL do weryfikacji hasła jednorazowego"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Teksty niestandardowe zapisane." "UPDATED": "Teksty niestandardowe zapisane."

View File

@ -1294,6 +1294,8 @@
"INIT": "Inicialização", "INIT": "Inicialização",
"VE": "Verificar Email", "VE": "Verificar Email",
"VP": "Verificar Telefone", "VP": "Verificar Telefone",
"VSO": "Verificar OTP de SMS",
"VEO": "Verificar OTP de Email",
"PR": "Redefinição de Senha", "PR": "Redefinição de Senha",
"DC": "Reivindicação de Domínio", "DC": "Reivindicação de Domínio",
"PL": "Sem senha", "PL": "Sem senha",
@ -1314,7 +1316,9 @@
"verifiedPhone": "Telefone verificado", "verifiedPhone": "Telefone verificado",
"changedate": "Data de alteração", "changedate": "Data de alteração",
"username": "Nome de usuário", "username": "Nome de usuário",
"tempUsername": "Nome de usuário temporário" "tempUsername": "Nome de usuário temporário",
"otp": "Senha de uso único",
"verifyUrl": "URL para verificar a senha de uso único"
}, },
"TOAST": { "TOAST": {
"UPDATED": "Textos personalizados salvos." "UPDATED": "Textos personalizados salvos."

View File

@ -1292,6 +1292,8 @@
"INIT": "初始化", "INIT": "初始化",
"VE": "验证电子邮箱", "VE": "验证电子邮箱",
"VP": "验证手机号码", "VP": "验证手机号码",
"VSO": "验证短信一次性密码",
"VEO": "验证电子邮件一次性密码",
"PR": "重置密码", "PR": "重置密码",
"DC": "域名声明", "DC": "域名声明",
"PL": "无密码身份验证", "PL": "无密码身份验证",
@ -1312,7 +1314,9 @@
"verifiedPhone": "已验证的手机号码", "verifiedPhone": "已验证的手机号码",
"changedate": "修改于", "changedate": "修改于",
"username": "用户名", "username": "用户名",
"tempUsername": "临时用户名" "tempUsername": "临时用户名",
"otp": "一次性密码",
"verifyUrl": "验证一次性密码的URL"
}, },
"TOAST": { "TOAST": {
"UPDATED": "自定义文本已保存。" "UPDATED": "自定义文本已保存。"

View File

@ -185,21 +185,23 @@ describe('quotas', () => {
}); });
} }
}); });
cy.waitUntil(() => cy.waitUntil(
cy.task<Array<ZITADELWebhookEvent>>('handledWebhookEvents').then((events) => { () =>
if (events.length < 1) { cy.task<Array<ZITADELWebhookEvent>>('handledWebhookEvents').then((events) => {
return false; if (events.length < 1) {
} return false;
return Cypress._.matches(<ZITADELWebhookEvent>{ }
sentStatus: 200, return Cypress._.matches(<ZITADELWebhookEvent>{
payload: { sentStatus: 200,
callURL: callURL, payload: {
threshold: percent, callURL: callURL,
unit: 1, threshold: percent,
usage: percent, unit: 1,
}, usage: percent,
})(events[0]); },
}), })(events[0]);
}),
{ timeout: 60_000 },
); );
}); });
}); });
@ -284,29 +286,31 @@ describe('quotas', () => {
} }
}); });
}); });
cy.waitUntil(() => cy.waitUntil(
cy.task<Array<ZITADELWebhookEvent>>('handledWebhookEvents').then((events) => { () =>
let foundExpected = 0; cy.task<Array<ZITADELWebhookEvent>>('handledWebhookEvents').then((events) => {
for (let i = 0; i < events.length; i++) { let foundExpected = 0;
for (let expect = 10; expect <= 30; expect += 10) { for (let i = 0; i < events.length; i++) {
if ( for (let expect = 10; expect <= 30; expect += 10) {
Cypress._.matches(<ZITADELWebhookEvent>{ if (
sentStatus: 200, Cypress._.matches(<ZITADELWebhookEvent>{
payload: { sentStatus: 200,
callURL: callURL, payload: {
threshold: expect, callURL: callURL,
unit: 1, threshold: expect,
usage: expect, unit: 1,
}, usage: expect,
})(events[i]) },
) { })(events[i])
foundExpected++; ) {
foundExpected++;
}
} }
} }
} return foundExpected >= 3;
return foundExpected >= 3; }),
}), { timeout: 60_000 },
), { timeout: 60_000 }; );
}); });
}); });
}); });

View File

@ -204,6 +204,102 @@ func (s *Server) ResetCustomVerifyPhoneMessageTextToDefault(ctx context.Context,
}, nil }, nil
} }
func (s *Server) GetDefaultVerifySMSOTPMessageText(ctx context.Context, req *admin_pb.GetDefaultVerifySMSOTPMessageTextRequest) (*admin_pb.GetDefaultVerifySMSOTPMessageTextResponse, error) {
msg, err := s.query.DefaultMessageTextByTypeAndLanguageFromFileSystem(ctx, domain.VerifySMSOTPMessageType, req.Language)
if err != nil {
return nil, err
}
return &admin_pb.GetDefaultVerifySMSOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) GetCustomVerifySMSOTPMessageText(ctx context.Context, req *admin_pb.GetCustomVerifySMSOTPMessageTextRequest) (*admin_pb.GetCustomVerifySMSOTPMessageTextResponse, error) {
msg, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, authz.GetInstance(ctx).InstanceID(), domain.VerifySMSOTPMessageType, req.Language, false)
if err != nil {
return nil, err
}
return &admin_pb.GetCustomVerifySMSOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) SetDefaultVerifySMSOTPMessageText(ctx context.Context, req *admin_pb.SetDefaultVerifySMSOTPMessageTextRequest) (*admin_pb.SetDefaultVerifySMSOTPMessageTextResponse, error) {
result, err := s.command.SetDefaultMessageText(ctx, authz.GetInstance(ctx).InstanceID(), SetVerifySMSOTPCustomTextToDomain(req))
if err != nil {
return nil, err
}
return &admin_pb.SetDefaultVerifySMSOTPMessageTextResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) ResetCustomVerifySMSOTPMessageTextToDefault(ctx context.Context, req *admin_pb.ResetCustomVerifySMSOTPMessageTextToDefaultRequest) (*admin_pb.ResetCustomVerifySMSOTPMessageTextToDefaultResponse, error) {
result, err := s.command.RemoveInstanceMessageTexts(ctx, domain.VerifySMSOTPMessageType, language.Make(req.Language))
if err != nil {
return nil, err
}
return &admin_pb.ResetCustomVerifySMSOTPMessageTextToDefaultResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) GetDefaultVerifyEmailOTPMessageText(ctx context.Context, req *admin_pb.GetDefaultVerifyEmailOTPMessageTextRequest) (*admin_pb.GetDefaultVerifyEmailOTPMessageTextResponse, error) {
msg, err := s.query.DefaultMessageTextByTypeAndLanguageFromFileSystem(ctx, domain.VerifyEmailOTPMessageType, req.Language)
if err != nil {
return nil, err
}
return &admin_pb.GetDefaultVerifyEmailOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) GetCustomVerifyEmailOTPMessageText(ctx context.Context, req *admin_pb.GetCustomVerifyEmailOTPMessageTextRequest) (*admin_pb.GetCustomVerifyEmailOTPMessageTextResponse, error) {
msg, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, authz.GetInstance(ctx).InstanceID(), domain.VerifyEmailOTPMessageType, req.Language, false)
if err != nil {
return nil, err
}
return &admin_pb.GetCustomVerifyEmailOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) SetDefaultVerifyEmailOTPMessageText(ctx context.Context, req *admin_pb.SetDefaultVerifyEmailOTPMessageTextRequest) (*admin_pb.SetDefaultVerifyEmailOTPMessageTextResponse, error) {
result, err := s.command.SetDefaultMessageText(ctx, authz.GetInstance(ctx).InstanceID(), SetVerifyEmailOTPCustomTextToDomain(req))
if err != nil {
return nil, err
}
return &admin_pb.SetDefaultVerifyEmailOTPMessageTextResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) ResetCustomVerifyEmailOTPMessageTextToDefault(ctx context.Context, req *admin_pb.ResetCustomVerifyEmailOTPMessageTextToDefaultRequest) (*admin_pb.ResetCustomVerifyEmailOTPMessageTextToDefaultResponse, error) {
result, err := s.command.RemoveInstanceMessageTexts(ctx, domain.VerifyEmailOTPMessageType, language.Make(req.Language))
if err != nil {
return nil, err
}
return &admin_pb.ResetCustomVerifyEmailOTPMessageTextToDefaultResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) GetDefaultDomainClaimedMessageText(ctx context.Context, req *admin_pb.GetDefaultDomainClaimedMessageTextRequest) (*admin_pb.GetDefaultDomainClaimedMessageTextResponse, error) { func (s *Server) GetDefaultDomainClaimedMessageText(ctx context.Context, req *admin_pb.GetDefaultDomainClaimedMessageTextRequest) (*admin_pb.GetDefaultDomainClaimedMessageTextResponse, error) {
msg, err := s.query.DefaultMessageTextByTypeAndLanguageFromFileSystem(ctx, domain.DomainClaimedMessageType, req.Language) msg, err := s.query.DefaultMessageTextByTypeAndLanguageFromFileSystem(ctx, domain.DomainClaimedMessageType, req.Language)
if err != nil { if err != nil {

View File

@ -68,6 +68,30 @@ func SetVerifyPhoneCustomTextToDomain(msg *admin_pb.SetDefaultVerifyPhoneMessage
} }
} }
func SetVerifySMSOTPCustomTextToDomain(msg *admin_pb.SetDefaultVerifySMSOTPMessageTextRequest) *domain.CustomMessageText {
langTag := language.Make(msg.Language)
return &domain.CustomMessageText{
MessageTextType: domain.VerifySMSOTPMessageType,
Language: langTag,
Text: msg.Text,
}
}
func SetVerifyEmailOTPCustomTextToDomain(msg *admin_pb.SetDefaultVerifyEmailOTPMessageTextRequest) *domain.CustomMessageText {
langTag := language.Make(msg.Language)
return &domain.CustomMessageText{
MessageTextType: domain.VerifyEmailOTPMessageType,
Language: langTag,
Title: msg.Title,
PreHeader: msg.PreHeader,
Subject: msg.Subject,
Greeting: msg.Greeting,
Text: msg.Text,
ButtonText: msg.ButtonText,
FooterText: msg.FooterText,
}
}
func SetDomainClaimedCustomTextToDomain(msg *admin_pb.SetDefaultDomainClaimedMessageTextRequest) *domain.CustomMessageText { func SetDomainClaimedCustomTextToDomain(msg *admin_pb.SetDefaultDomainClaimedMessageTextRequest) *domain.CustomMessageText {
langTag := language.Make(msg.Language) langTag := language.Make(msg.Language)
return &domain.CustomMessageText{ return &domain.CustomMessageText{

View File

@ -152,6 +152,16 @@ func (s *Server) ExportData(ctx context.Context, req *admin_pb.ExportDataRequest
return nil, err return nil, err
} }
org.VerifySmsOtpMessages, err = s.getCustomVerifySMSOTPMessageTexts(ctx, org.GetOrgId(), langResp.Languages)
if err != nil {
return nil, err
}
org.VerifyEmailOtpMessages, err = s.getCustomVerifyEmailOTPMessageTexts(ctx, org.GetOrgId(), langResp.Languages)
if err != nil {
return nil, err
}
org.DomainClaimedMessages, err = s.getCustomDomainClaimedMessageTexts(ctx, org.GetOrgId(), langResp.Languages) org.DomainClaimedMessages, err = s.getCustomDomainClaimedMessageTexts(ctx, org.GetOrgId(), langResp.Languages)
if err != nil { if err != nil {
return nil, err return nil, err
@ -1160,6 +1170,50 @@ func (s *Server) getCustomVerifyPhoneMessageTexts(ctx context.Context, org strin
return customTexts, nil return customTexts, nil
} }
func (s *Server) getCustomVerifySMSOTPMessageTexts(ctx context.Context, org string, languages []string) ([]*management_pb.SetCustomVerifySMSOTPMessageTextRequest, error) {
customTexts := make([]*management_pb.SetCustomVerifySMSOTPMessageTextRequest, 0, len(languages))
for _, lang := range languages {
text, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, org, domain.VerifySMSOTPMessageType, lang, false)
if err != nil {
return nil, err
}
if !text.IsDefault {
customTexts = append(customTexts, &management_pb.SetCustomVerifySMSOTPMessageTextRequest{
Language: lang,
Text: text.Text,
})
}
}
return customTexts, nil
}
func (s *Server) getCustomVerifyEmailOTPMessageTexts(ctx context.Context, org string, languages []string) ([]*management_pb.SetCustomVerifyEmailOTPMessageTextRequest, error) {
customTexts := make([]*management_pb.SetCustomVerifyEmailOTPMessageTextRequest, 0, len(languages))
for _, lang := range languages {
text, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, org, domain.VerifyEmailOTPMessageType, lang, false)
if err != nil {
return nil, err
}
if !text.IsDefault {
customTexts = append(customTexts, &management_pb.SetCustomVerifyEmailOTPMessageTextRequest{
Language: lang,
Title: text.Title,
PreHeader: text.PreHeader,
Subject: text.Subject,
Greeting: text.Greeting,
Text: text.Text,
ButtonText: text.ButtonText,
FooterText: text.Footer,
})
}
}
return customTexts, nil
}
func (s *Server) getCustomDomainClaimedMessageTexts(ctx context.Context, org string, languages []string) ([]*management_pb.SetCustomDomainClaimedMessageTextRequest, error) { func (s *Server) getCustomDomainClaimedMessageTexts(ctx context.Context, org string, languages []string) ([]*management_pb.SetCustomDomainClaimedMessageTextRequest, error) {
customTexts := make([]*management_pb.SetCustomDomainClaimedMessageTextRequest, 0, len(languages)) customTexts := make([]*management_pb.SetCustomDomainClaimedMessageTextRequest, 0, len(languages))
for _, lang := range languages { for _, lang := range languages {

View File

@ -204,6 +204,102 @@ func (s *Server) ResetCustomVerifyPhoneMessageTextToDefault(ctx context.Context,
}, nil }, nil
} }
func (s *Server) GetCustomVerifySMSOTPMessageText(ctx context.Context, req *mgmt_pb.GetCustomVerifySMSOTPMessageTextRequest) (*mgmt_pb.GetCustomVerifySMSOTPMessageTextResponse, error) {
msg, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, authz.GetCtxData(ctx).OrgID, domain.VerifySMSOTPMessageType, req.Language, false)
if err != nil {
return nil, err
}
return &mgmt_pb.GetCustomVerifySMSOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) GetDefaultVerifySMSOTPMessageText(ctx context.Context, req *mgmt_pb.GetDefaultVerifySMSOTPMessageTextRequest) (*mgmt_pb.GetDefaultVerifySMSOTPMessageTextResponse, error) {
msg, err := s.query.IAMMessageTextByTypeAndLanguage(ctx, domain.VerifySMSOTPMessageType, req.Language)
if err != nil {
return nil, err
}
return &mgmt_pb.GetDefaultVerifySMSOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) SetCustomVerifySMSOTPMessageText(ctx context.Context, req *mgmt_pb.SetCustomVerifySMSOTPMessageTextRequest) (*mgmt_pb.SetCustomVerifySMSOTPMessageTextResponse, error) {
result, err := s.command.SetOrgMessageText(ctx, authz.GetCtxData(ctx).OrgID, SetVerifySMSOTPCustomTextToDomain(req))
if err != nil {
return nil, err
}
return &mgmt_pb.SetCustomVerifySMSOTPMessageTextResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) ResetCustomVerifySMSOTPMessageTextToDefault(ctx context.Context, req *mgmt_pb.ResetCustomVerifySMSOTPMessageTextToDefaultRequest) (*mgmt_pb.ResetCustomVerifySMSOTPMessageTextToDefaultResponse, error) {
result, err := s.command.RemoveOrgMessageTexts(ctx, authz.GetCtxData(ctx).OrgID, domain.VerifySMSOTPMessageType, language.Make(req.Language))
if err != nil {
return nil, err
}
return &mgmt_pb.ResetCustomVerifySMSOTPMessageTextToDefaultResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) GetCustomVerifyEmailOTPMessageText(ctx context.Context, req *mgmt_pb.GetCustomVerifyEmailOTPMessageTextRequest) (*mgmt_pb.GetCustomVerifyEmailOTPMessageTextResponse, error) {
msg, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, authz.GetCtxData(ctx).OrgID, domain.VerifyEmailOTPMessageType, req.Language, false)
if err != nil {
return nil, err
}
return &mgmt_pb.GetCustomVerifyEmailOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) GetDefaultVerifyEmailOTPMessageText(ctx context.Context, req *mgmt_pb.GetDefaultVerifyEmailOTPMessageTextRequest) (*mgmt_pb.GetDefaultVerifyEmailOTPMessageTextResponse, error) {
msg, err := s.query.IAMMessageTextByTypeAndLanguage(ctx, domain.VerifyEmailOTPMessageType, req.Language)
if err != nil {
return nil, err
}
return &mgmt_pb.GetDefaultVerifyEmailOTPMessageTextResponse{
CustomText: text_grpc.ModelCustomMessageTextToPb(msg),
}, nil
}
func (s *Server) SetCustomVerifyEmailOTPMessageText(ctx context.Context, req *mgmt_pb.SetCustomVerifyEmailOTPMessageTextRequest) (*mgmt_pb.SetCustomVerifyEmailOTPMessageTextResponse, error) {
result, err := s.command.SetOrgMessageText(ctx, authz.GetCtxData(ctx).OrgID, SetVerifyEmailOTPCustomTextToDomain(req))
if err != nil {
return nil, err
}
return &mgmt_pb.SetCustomVerifyEmailOTPMessageTextResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) ResetCustomVerifyEmailOTPMessageTextToDefault(ctx context.Context, req *mgmt_pb.ResetCustomVerifyEmailOTPMessageTextToDefaultRequest) (*mgmt_pb.ResetCustomVerifyEmailOTPMessageTextToDefaultResponse, error) {
result, err := s.command.RemoveOrgMessageTexts(ctx, authz.GetCtxData(ctx).OrgID, domain.VerifyEmailOTPMessageType, language.Make(req.Language))
if err != nil {
return nil, err
}
return &mgmt_pb.ResetCustomVerifyEmailOTPMessageTextToDefaultResponse{
Details: object.ChangeToDetailsPb(
result.Sequence,
result.EventDate,
result.ResourceOwner,
),
}, nil
}
func (s *Server) GetCustomDomainClaimedMessageText(ctx context.Context, req *mgmt_pb.GetCustomDomainClaimedMessageTextRequest) (*mgmt_pb.GetCustomDomainClaimedMessageTextResponse, error) { func (s *Server) GetCustomDomainClaimedMessageText(ctx context.Context, req *mgmt_pb.GetCustomDomainClaimedMessageTextRequest) (*mgmt_pb.GetCustomDomainClaimedMessageTextResponse, error) {
msg, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, authz.GetCtxData(ctx).OrgID, domain.DomainClaimedMessageType, req.Language, false) msg, err := s.query.CustomMessageTextByTypeAndLanguage(ctx, authz.GetCtxData(ctx).OrgID, domain.DomainClaimedMessageType, req.Language, false)
if err != nil { if err != nil {

View File

@ -68,6 +68,30 @@ func SetVerifyPhoneCustomTextToDomain(msg *mgmt_pb.SetCustomVerifyPhoneMessageTe
} }
} }
func SetVerifySMSOTPCustomTextToDomain(msg *mgmt_pb.SetCustomVerifySMSOTPMessageTextRequest) *domain.CustomMessageText {
langTag := language.Make(msg.Language)
return &domain.CustomMessageText{
MessageTextType: domain.VerifySMSOTPMessageType,
Language: langTag,
Text: msg.Text,
}
}
func SetVerifyEmailOTPCustomTextToDomain(msg *mgmt_pb.SetCustomVerifyEmailOTPMessageTextRequest) *domain.CustomMessageText {
langTag := language.Make(msg.Language)
return &domain.CustomMessageText{
MessageTextType: domain.VerifyEmailOTPMessageType,
Language: langTag,
Title: msg.Title,
PreHeader: msg.PreHeader,
Subject: msg.Subject,
Greeting: msg.Greeting,
Text: msg.Text,
ButtonText: msg.ButtonText,
FooterText: msg.FooterText,
}
}
func SetDomainClaimedCustomTextToDomain(msg *mgmt_pb.SetCustomDomainClaimedMessageTextRequest) *domain.CustomMessageText { func SetDomainClaimedCustomTextToDomain(msg *mgmt_pb.SetCustomDomainClaimedMessageTextRequest) *domain.CustomMessageText {
langTag := language.Make(msg.Language) langTag := language.Make(msg.Language)
return &domain.CustomMessageText{ return &domain.CustomMessageText{

View File

@ -11,6 +11,8 @@ const (
PasswordResetMessageType = "PasswordReset" PasswordResetMessageType = "PasswordReset"
VerifyEmailMessageType = "VerifyEmail" VerifyEmailMessageType = "VerifyEmail"
VerifyPhoneMessageType = "VerifyPhone" VerifyPhoneMessageType = "VerifyPhone"
VerifySMSOTPMessageType = "VerifySMSOTP"
VerifyEmailOTPMessageType = "VerifyEmailOTP"
DomainClaimedMessageType = "DomainClaimed" DomainClaimedMessageType = "DomainClaimed"
PasswordlessRegistrationMessageType = "PasswordlessRegistration" PasswordlessRegistrationMessageType = "PasswordlessRegistration"
PasswordChangeMessageType = "PasswordChange" PasswordChangeMessageType = "PasswordChange"
@ -53,31 +55,13 @@ func (m *CustomMessageText) IsValid() bool {
return m.MessageTextType != "" && m.Language != language.Und return m.MessageTextType != "" && m.Language != language.Und
} }
func (m *MessageTexts) GetMessageTextByType(msgType string) *CustomMessageText {
switch msgType {
case InitCodeMessageType:
return &m.InitCode
case PasswordResetMessageType:
return &m.PasswordReset
case VerifyEmailMessageType:
return &m.VerifyEmail
case VerifyPhoneMessageType:
return &m.VerifyPhone
case DomainClaimedMessageType:
return &m.DomainClaimed
case PasswordlessRegistrationMessageType:
return &m.PasswordlessRegistration
case PasswordChangeMessageType:
return &m.PasswordChange
}
return nil
}
func IsMessageTextType(textType string) bool { func IsMessageTextType(textType string) bool {
return textType == InitCodeMessageType || return textType == InitCodeMessageType ||
textType == PasswordResetMessageType || textType == PasswordResetMessageType ||
textType == VerifyEmailMessageType || textType == VerifyEmailMessageType ||
textType == VerifyPhoneMessageType || textType == VerifyPhoneMessageType ||
textType == VerifySMSOTPMessageType ||
textType == VerifyEmailOTPMessageType ||
textType == DomainClaimedMessageType || textType == DomainClaimedMessageType ||
textType == PasswordlessRegistrationMessageType || textType == PasswordlessRegistrationMessageType ||
textType == PasswordChangeMessageType textType == PasswordChangeMessageType

View File

@ -32,6 +32,15 @@ VerifyPhone:
Greeting: 'Здравейте {{.DisplayName}},' Greeting: 'Здравейте {{.DisplayName}},'
Text: 'Добавен е нов телефонен номер. {{.Code}}' Text: 'Добавен е нов телефонен номер. {{.Code}}'
ButtonText: Потвърдете телефона ButtonText: Потвърдете телефона
VerifyEmailOTP:
Title: ZITADEL - Потвърди временната парола
PreHeader: Потвърди временната парола
Subject: Потвърди временната парола
Greeting: Здравей, {{.DisplayName}},
Text: Моля, използвай бутона 'Удостовери' или копирай временната парола {{.OTP}} и я постави на екрана за удостоверяване, за да се удостовериш в ZITADEL в рамките на следващите пет минути.
ButtonText: Удостовери
VerifySMSOTP:
Text: Моля, посети {{ .VerifyURL }} или копирай временната парола {{.OTP}} и я постави на екрана за удостоверяване, за да се удостовериш в ZITADEL в рамките на следващите пет минути.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Домейнът е заявен Title: ZITADEL - Домейнът е заявен
PreHeader: Промяна на имейл/потребителско име PreHeader: Промяна на имейл/потребителско име

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: Hallo {{.DisplayName}}, Greeting: Hallo {{.DisplayName}},
Text: Eine Telefonnummer wurde hinzugefügt. Bitte verifiziere diese in dem du folgenden Code eingibst&lt;br&gt;(Code &lt;strong&gt;{{.Code}}&lt;/strong&gt;).&lt;br&gt; Text: Eine Telefonnummer wurde hinzugefügt. Bitte verifiziere diese in dem du folgenden Code eingibst&lt;br&gt;(Code &lt;strong&gt;{{.Code}}&lt;/strong&gt;).&lt;br&gt;
ButtonText: Telefon verifizieren ButtonText: Telefon verifizieren
VerifyEmailOTP:
Title: ZITADEL - Einmalpasswort verifizieren
PreHeader: Einmalpasswort verifizieren
Subject: Einmalpasswort verifizieren
Greeting: Hallo {{.DisplayName}},
Text: Bitte nutze den 'Authentifizieren'-Button oder kopiere das Einmalpasswort {{.OTP}} und füge es in den Authentifizierungsbildschirm ein, um dich innerhalb der nächsten fünf Minuten bei ZITADEL zu authentifizieren.
ButtonText: Authentifizieren
VerifySMSOTP:
Text: Bitte besuche {{ .VerifyURL }} oder kopiere das Einmalpasswort {{.OTP}} und füge es in den Authentifizierungsbildschirm ein, um dich innerhalb der nächsten fünf Minuten bei ZITADEL zu authentifizieren.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Domain wurde beansprucht Title: ZITADEL - Domain wurde beansprucht
PreHeader: Email / Username ändern PreHeader: Email / Username ändern

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: Hello {{.DisplayName}}, Greeting: Hello {{.DisplayName}},
Text: A new phone number has been added. Please use the following code to verify it {{.Code}} Text: A new phone number has been added. Please use the following code to verify it {{.Code}}
ButtonText: Verify phone ButtonText: Verify phone
VerifyEmailOTP:
Title: ZITADEL - Verify One-Time Password
PreHeader: Verify One-Time Password
Subject: Verify One-Time Password
Greeting: Hello {{.DisplayName}},
Text: Please use the "Authenticate" button or copy the one-time password {{.OTP}} and paste it to to the authentication screen in order to authenticate at ZITADEL within the next five minutes.
ButtonText: Authenticate
VerifySMSOTP:
Text: Please visit {{ .VerifyURL }} or copy the one-time password {{.OTP}} and paste it to to the authentication screen in order to authenticate at ZITADEL within the next five minutes.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Domain has been claimed Title: ZITADEL - Domain has been claimed
PreHeader: Change email / username PreHeader: Change email / username

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: Hola {{.DisplayName}}, Greeting: Hola {{.DisplayName}},
Text: Se ha añadido un nuevo número de teléfono. Por favor, usa el siguiente código para verificarlo {{.Code}} Text: Se ha añadido un nuevo número de teléfono. Por favor, usa el siguiente código para verificarlo {{.Code}}
ButtonText: Verificar teléfono ButtonText: Verificar teléfono
VerifyEmailOTP:
Title: ZITADEL - Verifica la contraseña de un solo uso
PreHeader: Verifica la contraseña de un solo uso
Subject: Verifica la contraseña de un solo uso
Greeting: Hola {{.DisplayName}},
Text: Por favor, utiliza el botón 'Autenticar' o copia la contraseña de un solo uso {{.OTP}} y pégala en la pantalla de autenticación para autenticarte en ZITADEL en los próximos cinco minutos.
ButtonText: Autenticar
VerifySMSOTP:
Text: Por favor, visita {{ .VerifyURL }} o copia la contraseña de un solo uso {{.OTP}} y pégala en la pantalla de autenticación para autenticarte en ZITADEL en los próximos cinco minutos.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Se ha reclamado un dominio Title: ZITADEL - Se ha reclamado un dominio
PreHeader: Cambiar dirección de correo electrónico / nombre de usuario PreHeader: Cambiar dirección de correo electrónico / nombre de usuario

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: Bonjour {{.DisplayName}}, Greeting: Bonjour {{.DisplayName}},
Text: Un nouveau numéro de téléphone a été ajouté. Veuillez utiliser le code suivant pour le vérifier {{.Code}} Text: Un nouveau numéro de téléphone a été ajouté. Veuillez utiliser le code suivant pour le vérifier {{.Code}}
ButtonText: Vérifier le téléphone ButtonText: Vérifier le téléphone
VerifyEmailOTP:
Title: ZITADEL - Vérifie le mot de passe à usage unique
PreHeader: Vérifie le mot de passe à usage unique
Subject: Vérifie le mot de passe à usage unique
Greeting: Bonjour {{.DisplayName}},
Text: Utilise le bouton 'Authentifier' ou copie le mot de passe à usage unique {{.OTP}} et colle-le à l'écran d'authentification pour t'authentifier sur ZITADEL dans les cinq prochaines minutes.
ButtonText: Authentifier
VerifySMSOTP:
Text: Visite {{ .VerifyURL }} ou copie le mot de passe à usage unique {{.OTP}} et colle-le à l'écran d'authentification pour t'authentifier sur ZITADEL dans les cinq prochaines minutes.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Le domaine a été réclamé Title: ZITADEL - Le domaine a été réclamé
PreHeader: Modifier l'email / le nom d'utilisateur PreHeader: Modifier l'email / le nom d'utilisateur

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: 'Ciao {{.DisplayName}},' Greeting: 'Ciao {{.DisplayName}},'
Text: È stato aggiunto un nuovo numero di telefono. Usa il seguente codice per verificarlo {{.Code}} Text: È stato aggiunto un nuovo numero di telefono. Usa il seguente codice per verificarlo {{.Code}}
ButtonText: Verifica ButtonText: Verifica
VerifyEmailOTP:
Title: ZITADEL - Verifica la password monouso
PreHeader: Verifica la password monouso
Subject: Verifica la password monouso
Greeting: Ciao {{.DisplayName}},
Text: Per favore, utilizza il pulsante 'Autentica' o copia la password monouso {{.OTP}} e incollala nella schermata di autenticazione per autenticarti a ZITADEL entro i prossimi cinque minuti.
ButtonText: Autentica
VerifySMSOTP:
Text: Per favore, visita {{ .VerifyURL }} o copia la password monouso {{.OTP}} e incollala nella schermata di autenticazione per autenticarti a ZITADEL entro i prossimi cinque minuti.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Il dominio è stato rivendicato Title: ZITADEL - Il dominio è stato rivendicato
PreHeader: Cambiare email / nome utente PreHeader: Cambiare email / nome utente

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: こんにちは {{.DisplayName}} さん、 Greeting: こんにちは {{.DisplayName}} さん、
Text: 新しい電話番号が追加されました。次のコードを使用してを認証してください {{.Code}} Text: 新しい電話番号が追加されました。次のコードを使用してを認証してください {{.Code}}
ButtonText: 電話番号を認証 ButtonText: 電話番号を認証
VerifyEmailOTP:
Title: ZITADEL - ワンタイムパスワードを確認する
PreHeader: ワンタイムパスワードを確認する
Subject: ワンタイムパスワードを確認する
Greeting: こんにちは、{{.DisplayName}}さん
Text: '認証'ボタンを使用するか、ワンタイムパスワード {{.OTP}} をコピーして認証画面に貼り付け、次の5分以内にZITADELで認証してください。
ButtonText: 認証
VerifySMSOTP:
Text: {{ .VerifyURL }} を訪れるか、ワンタイムパスワード {{.OTP}} をコピーして認証画面に貼り付け、次の5分以内にZITADELで認証してください。
DomainClaimed: DomainClaimed:
Title: ZITADEL - ドメインの登録 Title: ZITADEL - ドメインの登録
PreHeader: メールアドレス・ユーザー名の変更 PreHeader: メールアドレス・ユーザー名の変更

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: Здраво {{.DisplayName}}, Greeting: Здраво {{.DisplayName}},
Text: Додаден е нов телефонски број. Ве молиме користете го следниот код за да го верифицирате. {{.Code}} Text: Додаден е нов телефонски број. Ве молиме користете го следниот код за да го верифицирате. {{.Code}}
ButtonText: Верифицирај телефонски број ButtonText: Верифицирај телефонски број
VerifyEmailOTP:
Title: ZITADEL - Потврди еднократна лозинка
PreHeader: Потврди еднократна лозинка
Subject: Потврди еднократна лозинка
Greeting: Здраво {{.DisplayName}},
Text: Ве молам, користи го копчето 'Автентицирај' или копирај ја еднократната лозинка {{.OTP}} и стави ја на екранот за автентикација за да се автентицираш на ZITADEL во следните пет минути.
ButtonText: Автентицирај
VerifySMSOTP:
Text: Ве молам, посети го {{ .VerifyURL }} или копирај ја еднократната лозинка {{.OTP}} и стави ја на екранот за автентикација за да се автентицираш на ZITADEL во следните пет минути.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Доменот е преземен Title: ZITADEL - Доменот е преземен
PreHeader: Промена на е-пошта / корисничко име PreHeader: Промена на е-пошта / корисничко име

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: Witaj {{.DisplayName}}, Greeting: Witaj {{.DisplayName}},
Text: Został dodany nowy numer telefonu. Użyj następującego kodu, aby go zweryfikować {{.Code}} Text: Został dodany nowy numer telefonu. Użyj następującego kodu, aby go zweryfikować {{.Code}}
ButtonText: Zweryfikuj numer telefonu ButtonText: Zweryfikuj numer telefonu
VerifyEmailOTP:
Title: ZITADEL - Zatwierdź hasło jednorazowe
PreHeader: Zatwierdź hasło jednorazowe
Subject: Zatwierdź hasło jednorazowe
Greeting: Witaj {{.DisplayName}},
Text: Proszę, użyj przycisku 'Uwierzytelnij' lub skopiuj hasło jednorazowe {{.OTP}} i wklej go na ekran uwierzytelniania, aby uwierzytelnić się w ZITADEL w ciągu najbliższych pięciu minut.
ButtonText: Uwierzytelnij
VerifySMSOTP:
Text: Proszę, odwiedź {{ .VerifyURL }} lub skopiuj hasło jednorazowe {{.OTP}} i wklej go na ekran uwierzytelniania, aby uwierzytelnić się w ZITADEL w ciągu najbliższych pięciu minut.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Domena została zarejestrowana Title: ZITADEL - Domena została zarejestrowana
PreHeader: Zmiana adresu e-mail / nazwy użytkownika PreHeader: Zmiana adresu e-mail / nazwy użytkownika

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: Olá {{.DisplayName}}, Greeting: Olá {{.DisplayName}},
Text: Um novo número de telefone foi adicionado. Por favor, use o código a seguir para verificá-lo {{.Code}} Text: Um novo número de telefone foi adicionado. Por favor, use o código a seguir para verificá-lo {{.Code}}
ButtonText: Verificar telefone ButtonText: Verificar telefone
VerifyEmailOTP:
Title: ZITADEL - Verifica a senha de uso único
PreHeader: Verifica a senha de uso único
Subject: Verifica a senha de uso único
Greeting: Olá {{.DisplayName}},
Text: Por favor, usa o botão 'Autenticar' ou copia a senha de uso único {{.OTP}} e cola-a na tela de autenticação para te autenticares no ZITADEL nos próximos cinco minutos.
ButtonText: Autenticar
VerifySMSOTP:
Text: Por favor, visita {{ .VerifyURL }} ou copia a senha de uso único {{.OTP}} e cola-a na tela de autenticação para te autenticares no ZITADEL nos próximos cinco minutos.
DomainClaimed: DomainClaimed:
Title: ZITADEL - Domínio foi reivindicado Title: ZITADEL - Domínio foi reivindicado
PreHeader: Alterar e-mail / nome de usuário PreHeader: Alterar e-mail / nome de usuário

View File

@ -26,6 +26,15 @@ VerifyPhone:
Greeting: 你好 {{.DisplayName}}, Greeting: 你好 {{.DisplayName}},
Text: 您的用户中添加了一个新的手机号码,请使用以下验证码进行验证 {{.Code}} Text: 您的用户中添加了一个新的手机号码,请使用以下验证码进行验证 {{.Code}}
ButtonText: 验证手机号码 ButtonText: 验证手机号码
VerifyEmailOTP:
Title: ZITADEL - 验证一次性密码
PreHeader: 验证一次性密码
Subject: 验证一次性密码
Greeting: 你好,{{.DisplayName}}
Text: 请使用 '验证' 按钮,或复制一次性密码 {{.OTP}} 并将其粘贴到验证屏幕中,以在接下来的五分钟内在 ZITADEL 中进行验证。
ButtonText: 验证
VerifySMSOTP:
Text: 请访问 {{ .VerifyURL }} 或复制一次性密码 {{.OTP}} 并将其粘贴到身份验证屏幕以在接下来的五分钟内在ZITADEL进行身份验证。
DomainClaimed: DomainClaimed:
Title: ZITADEL - 域名所有权验证 Title: ZITADEL - 域名所有权验证
PreHeader: 更改电子邮件/用户名 PreHeader: 更改电子邮件/用户名

View File

@ -28,6 +28,8 @@ type MessageTexts struct {
PasswordReset MessageText PasswordReset MessageText
VerifyEmail MessageText VerifyEmail MessageText
VerifyPhone MessageText VerifyPhone MessageText
VerifySMSOTP MessageText
VerifyEmailOTP MessageText
DomainClaimed MessageText DomainClaimed MessageText
PasswordlessRegistration MessageText PasswordlessRegistration MessageText
PasswordChange MessageText PasswordChange MessageText
@ -329,6 +331,10 @@ func (m *MessageTexts) GetMessageTextByType(msgType string) *MessageText {
return &m.VerifyEmail return &m.VerifyEmail
case domain.VerifyPhoneMessageType: case domain.VerifyPhoneMessageType:
return &m.VerifyPhone return &m.VerifyPhone
case domain.VerifySMSOTPMessageType:
return &m.VerifySMSOTP
case domain.VerifyEmailOTPMessageType:
return &m.VerifyEmailOTP
case domain.DomainClaimedMessageType: case domain.DomainClaimedMessageType:
return &m.DomainClaimed return &m.DomainClaimed
case domain.PasswordlessRegistrationMessageType: case domain.PasswordlessRegistrationMessageType:

View File

@ -299,7 +299,6 @@ func TestCustomTextProjection_reduces(t *testing.T) {
if _, ok := err.(errors.InvalidArgument); !ok { if _, ok := err.(errors.InvalidArgument); !ok {
t.Errorf("no wrong event mapping: %v, got: %v", err, got) t.Errorf("no wrong event mapping: %v, got: %v", err, got)
} }
event = tt.args.event(t) event = tt.args.event(t)
got, err = tt.reduce(event) got, err = tt.reduce(event)
assertReduce(t, got, err, CustomTextTable, tt.want) assertReduce(t, got, err, CustomTextTable, tt.want)

View File

@ -272,6 +272,8 @@ func isMessageTemplate(template string) bool {
template == domain.PasswordResetMessageType || template == domain.PasswordResetMessageType ||
template == domain.VerifyEmailMessageType || template == domain.VerifyEmailMessageType ||
template == domain.VerifyPhoneMessageType || template == domain.VerifyPhoneMessageType ||
template == domain.VerifySMSOTPMessageType ||
template == domain.VerifyEmailOTPMessageType ||
template == domain.DomainClaimedMessageType || template == domain.DomainClaimedMessageType ||
template == domain.PasswordlessRegistrationMessageType || template == domain.PasswordlessRegistrationMessageType ||
template == domain.PasswordChangeMessageType template == domain.PasswordChangeMessageType

View File

@ -29,7 +29,7 @@ Errors:
Limit: Limit:
ExceedsDefault: Limit überschreitet default Limit ExceedsDefault: Limit überschreitet default Limit
Language: Language:
NotParsed: Sprache konnte nicht gemapped werde NotParsed: Sprache konnte nicht gemapped werden
OIDCSettings: OIDCSettings:
NotFound: OIDC Konfiguration konnte nicht gefunden werden NotFound: OIDC Konfiguration konnte nicht gefunden werden
AlreadyExists: OIDC Konfiguration existiert bereits AlreadyExists: OIDC Konfiguration existiert bereits

View File

@ -2963,6 +2963,138 @@ service AdminService {
}; };
} }
rpc GetDefaultVerifySMSOTPMessageText(GetDefaultVerifySMSOTPMessageTextRequest) returns (GetDefaultVerifySMSOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/default/message/verifysmsotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Default Verify SMS OTP Message Text";
description: "Get the default text of the verify SMS OTP message that is stored as translation files in ZITADEL itself. The text will be sent to the users of all organizations, that do not have a custom text configured. The message is sent when an SMS One-time password should be verified and a notification provider is configured."
};
}
rpc GetCustomVerifySMSOTPMessageText(GetCustomVerifySMSOTPMessageTextRequest) returns (GetCustomVerifySMSOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/message/verifysmsotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Custom Verify SMS OTP Message Text";
description: "Get the custom text of the verify SMS OTP message that is overwritten on the instance as settings/database. The text will be sent to the users of all organizations, that do not have a custom text configured. The message is sent when an SMS One-time password should be verified and a notification provider is configured."
};
}
rpc SetDefaultVerifySMSOTPMessageText(SetDefaultVerifySMSOTPMessageTextRequest) returns (SetDefaultVerifySMSOTPMessageTextResponse) {
option (google.api.http) = {
put: "/text/message/verifysmsotp/{language}";
body: "*";
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.write";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Set Default Verify SMS OTP Reset Message Text";
description: "Set the custom text of the verify SMS OTP user message that is overwritten on the instance as settings/database. The text will be sent to the users of all organizations, that do not have a custom text configured. The message is sent when an SMS One-time password should be verified and a notification provider is configured. The Following Variables can be used: {{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}} {{.CreationDate}}"
};
}
rpc ResetCustomVerifySMSOTPMessageTextToDefault(ResetCustomVerifySMSOTPMessageTextToDefaultRequest) returns (ResetCustomVerifySMSOTPMessageTextToDefaultResponse) {
option (google.api.http) = {
delete: "/text/message/verifysmsotp/{language}"
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.delete"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Reset Custom Verify SMS OTP Message Text to Default";
description: "Removes the custom text of the verify SMS OTP message that is overwritten on the instance and triggers the text from the translation files stored in ZITADEL itself. The text will be sent to the users of all organizations, that do not have a custom text configured."
};
}
rpc GetDefaultVerifyEmailOTPMessageText(GetDefaultVerifyEmailOTPMessageTextRequest) returns (GetDefaultVerifyEmailOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/default/message/verifyemailotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Default Verify SMS OTP Message Text";
description: "Get the default text of the verify Email OTP message that is stored as translation files in ZITADEL itself. The text will be sent to the users of all organizations, that do not have a custom text configured. The message is sent when an SMS One-time password should be verified and a notification provider is configured."
};
}
rpc GetCustomVerifyEmailOTPMessageText(GetCustomVerifyEmailOTPMessageTextRequest) returns (GetCustomVerifyEmailOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/message/verifyemailotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Custom Verify SMS OTP Message Text";
description: "Get the custom text of the Email OTP message that is overwritten on the instance as settings/database. The text will be sent to the users of all organizations, that do not have a custom text configured. The message is sent when an SMS One-time password should be verified and a notification provider is configured."
};
}
rpc SetDefaultVerifyEmailOTPMessageText(SetDefaultVerifyEmailOTPMessageTextRequest) returns (SetDefaultVerifyEmailOTPMessageTextResponse) {
option (google.api.http) = {
put: "/text/message/verifyemailotp/{language}";
body: "*";
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.write";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Set Default Verify SMS OTP Reset Message Text";
description: "Set the custom text of the Email OTP user message that is overwritten on the instance as settings/database. The text will be sent to the users of all organizations, that do not have a custom text configured. The message is sent when an SMS One-time password should be verified and a notification provider is configured. The Following Variables can be used: {{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}} {{.CreationDate}}"
};
}
rpc ResetCustomVerifyEmailOTPMessageTextToDefault(ResetCustomVerifyEmailOTPMessageTextToDefaultRequest) returns (ResetCustomVerifyEmailOTPMessageTextToDefaultResponse) {
option (google.api.http) = {
delete: "/text/message/verifyemailotp/{language}"
};
option (zitadel.v1.auth_option) = {
permission: "iam.policy.delete"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Reset Custom Verify SMS OTP Message Text to Default";
description: "Removes the custom text of the Email OTP message that is overwritten on the instance and triggers the text from the translation files stored in ZITADEL itself. The text will be sent to the users of all organizations, that do not have a custom text configured."
};
}
rpc GetDefaultDomainClaimedMessageText(GetDefaultDomainClaimedMessageTextRequest) returns (GetDefaultDomainClaimedMessageTextResponse) { rpc GetDefaultDomainClaimedMessageText(GetDefaultDomainClaimedMessageTextRequest) returns (GetDefaultDomainClaimedMessageTextResponse) {
option (google.api.http) = { option (google.api.http) = {
get: "/text/default/message/domainclaimed/{language}"; get: "/text/default/message/domainclaimed/{language}";
@ -6487,6 +6619,132 @@ message ResetCustomVerifyPhoneMessageTextToDefaultResponse {
zitadel.v1.ObjectDetails details = 1; zitadel.v1.ObjectDetails details = 1;
} }
message GetCustomVerifySMSOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetCustomVerifySMSOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message GetDefaultVerifySMSOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetDefaultVerifySMSOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message SetDefaultVerifySMSOTPMessageTextRequest {
string language = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"de\""
}
];
string text = 2 [
(validate.rules).string = {max_len: 800},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Please visit {{ .VerifyURL }} or copy the one-time password {{.OTP}} and paste it to to the authentication screen in order to authenticate at ZITADEL within the next five minutes.\""
max_length: 800;
}
];
}
message SetDefaultVerifySMSOTPMessageTextResponse {
zitadel.v1.ObjectDetails details = 1;
}
message ResetCustomVerifySMSOTPMessageTextToDefaultRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message ResetCustomVerifySMSOTPMessageTextToDefaultResponse {
zitadel.v1.ObjectDetails details = 1;
}
message GetCustomVerifyEmailOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetCustomVerifyEmailOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message GetDefaultVerifyEmailOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetDefaultVerifyEmailOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message SetDefaultVerifyEmailOTPMessageTextRequest {
string language = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"de\""
}
];
string title = 2 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"ZITADEL - One-time Password\""
max_length: 200;
}
];
string pre_header = 3 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Verify One-time Password \""
max_length: 200;
}
];
string subject = 4 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Verify One-time Password\""
max_length: 200;
}
];
string greeting = 5 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Hello {{.FirstName}} {{.LastName}},\""
max_length: 200;
}
];
string text = 6 [
(validate.rules).string = {max_len: 800},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Please use the \\\"Authenticate\\\" button or copy the one-time password {{.OTP}} and paste it to to the authentication screen in order to authenticate at ZITADEL within the next five minutes.\""
max_length: 800;
}
];
string button_text = 7 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Authenticate\""
max_length: 200;
}
];
string footer_text = 8 [(validate.rules).string = {max_len: 200}];
}
message SetDefaultVerifyEmailOTPMessageTextResponse {
zitadel.v1.ObjectDetails details = 1;
}
message ResetCustomVerifyEmailOTPMessageTextToDefaultRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message ResetCustomVerifyEmailOTPMessageTextToDefaultResponse {
zitadel.v1.ObjectDetails details = 1;
}
message GetDefaultDomainClaimedMessageTextRequest { message GetDefaultDomainClaimedMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}]; string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
} }
@ -7098,6 +7356,9 @@ message DataOrg {
repeated zitadel.v1.v1.DataAppKey app_keys = 35; repeated zitadel.v1.v1.DataAppKey app_keys = 35;
repeated zitadel.v1.v1.DataMachineKey machine_keys = 36; repeated zitadel.v1.v1.DataMachineKey machine_keys = 36;
repeated zitadel.management.v1.SetCustomVerifySMSOTPMessageTextRequest verify_sms_otp_messages = 37;
repeated zitadel.management.v1.SetCustomVerifyEmailOTPMessageTextRequest verify_email_otp_messages = 38;
} }
message ImportDataResponse{ message ImportDataResponse{

View File

@ -5804,6 +5804,200 @@ service ManagementService {
}; };
} }
rpc GetCustomVerifySMSOTPMessageText(GetCustomVerifySMSOTPMessageTextRequest) returns (GetCustomVerifySMSOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/message/verifysmsotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Custom Verify SMS OTP Message Text";
description: "Get the custom text of the verify SMS OTP message that is set on the organization. The message is sent when an SMS One-time password should be verified and a notification provider is configured."
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc GetDefaultVerifySMSOTPMessageText(GetDefaultVerifySMSOTPMessageTextRequest) returns (GetDefaultVerifySMSOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/default/message/verifysmsotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Default Verify SMS OTP Message Text";
description: "Get the default text of the verify SMS OTP message that is set on the instance or as translation files in ZITADEL itself. The message is sent when an SMS One-time password should be verified and a notification provider is configured."
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc SetCustomVerifySMSOTPMessageText(SetCustomVerifySMSOTPMessageTextRequest) returns (SetCustomVerifySMSOTPMessageTextResponse) {
option (google.api.http) = {
put: "/text/message/verifysmsotp/{language}";
body: "*";
};
option (zitadel.v1.auth_option) = {
permission: "policy.write";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Set Custom Verify SMS OTP Reset Message Text";
description: "Set the custom text of the verify SMS OTP message for the organization. The message is sent when an SMS One-time password should be verified and a notification provider is configured. The Following Variables can be used: {{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}} {{.CreationDate}}"
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc ResetCustomVerifySMSOTPMessageTextToDefault(ResetCustomVerifySMSOTPMessageTextToDefaultRequest) returns (ResetCustomVerifySMSOTPMessageTextToDefaultResponse) {
option (google.api.http) = {
delete: "/text/message/verifysmsotp/{language}"
};
option (zitadel.v1.auth_option) = {
permission: "policy.delete"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Reset Custom Verify SMS OTP Message Text to Default";
description: "Removes the custom text of the verify SMS OTP message from the organization and therefore the default texts will trigger for the users afterward."
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc GetCustomVerifyEmailOTPMessageText(GetCustomVerifyEmailOTPMessageTextRequest) returns (GetCustomVerifyEmailOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/message/verifyemailotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Custom Verify Email OTP Message Text";
description: "Get the custom text of the verify Email OTP message that is set on the organization. The message is sent when an Email One-time password should be verified and a notification provider is configured."
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc GetDefaultVerifyEmailOTPMessageText(GetDefaultVerifyEmailOTPMessageTextRequest) returns (GetDefaultVerifyEmailOTPMessageTextResponse) {
option (google.api.http) = {
get: "/text/default/message/verifyemailotp/{language}";
};
option (zitadel.v1.auth_option) = {
permission: "policy.read";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Get Default Verify Email OTP Message Text";
description: "Get the default text of the verify Email OTP message that is set on the instance or as translation files in ZITADEL itself. The message is sent when an Email One-time password should be verified and a notification provider is configured."
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc SetCustomVerifyEmailOTPMessageText(SetCustomVerifyEmailOTPMessageTextRequest) returns (SetCustomVerifyEmailOTPMessageTextResponse) {
option (google.api.http) = {
put: "/text/message/verifyemailotp/{language}";
body: "*";
};
option (zitadel.v1.auth_option) = {
permission: "policy.write";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Set Custom Verify Email OTP Reset Message Text";
description: "Set the custom text of the verify Email OTP message for the organization. The message is sent when an Email One-time password should be verified and a notification provider is configured. The Following Variables can be used: {{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}} {{.CreationDate}}"
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc ResetCustomVerifyEmailOTPMessageTextToDefault(ResetCustomVerifyEmailOTPMessageTextToDefaultRequest) returns (ResetCustomVerifyEmailOTPMessageTextToDefaultResponse) {
option (google.api.http) = {
delete: "/text/message/verifyemailotp/{language}"
};
option (zitadel.v1.auth_option) = {
permission: "policy.delete"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Message Texts";
summary: "Reset Custom Verify Email OTP Message Text to Default";
description: "Removes the custom text of the verify Email OTP message from the organization and therefore the default texts will trigger for the users afterward."
parameters: {
headers: {
name: "x-zitadel-orgid";
description: "The default is always the organization of the requesting user. If you like to get/set a result of another organization include the header. Make sure the user has permission to access the requested data.";
type: STRING,
required: false;
};
};
};
}
rpc GetCustomDomainClaimedMessageText(GetCustomDomainClaimedMessageTextRequest) returns (GetCustomDomainClaimedMessageTextResponse) { rpc GetCustomDomainClaimedMessageText(GetCustomDomainClaimedMessageTextRequest) returns (GetCustomDomainClaimedMessageTextResponse) {
option (google.api.http) = { option (google.api.http) = {
get: "/text/message/domainclaimed/{language}"; get: "/text/message/domainclaimed/{language}";
@ -10735,6 +10929,130 @@ message ResetCustomVerifyPhoneMessageTextToDefaultResponse {
zitadel.v1.ObjectDetails details = 1; zitadel.v1.ObjectDetails details = 1;
} }
message GetCustomVerifySMSOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetCustomVerifySMSOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message GetDefaultVerifySMSOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetDefaultVerifySMSOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message SetCustomVerifySMSOTPMessageTextRequest {
string language = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"de\""
}
];
string text = 2 [
(validate.rules).string = {max_len: 800},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Please visit {{ .VerifyURL }} or copy the one-time password {{.OTP}} and paste it to to the authentication screen in order to authenticate at ZITADEL within the next five minutes.\""
max_length: 800;
}
];
}
message SetCustomVerifySMSOTPMessageTextResponse {
zitadel.v1.ObjectDetails details = 1;
}
message ResetCustomVerifySMSOTPMessageTextToDefaultRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message ResetCustomVerifySMSOTPMessageTextToDefaultResponse {
zitadel.v1.ObjectDetails details = 1;
}
message GetCustomVerifyEmailOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetCustomVerifyEmailOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message GetDefaultVerifyEmailOTPMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message GetDefaultVerifyEmailOTPMessageTextResponse {
zitadel.text.v1.MessageCustomText custom_text = 1;
}
message SetCustomVerifyEmailOTPMessageTextRequest {
string language = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"de\""
}
];
string title = 2 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"ZITADEL - One-time Password\""
max_length: 200;
}
];
string pre_header = 3 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Verify One-time Password \""
max_length: 200;
}
];
string subject = 4 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Verify One-time Password\""
max_length: 200;
}
];
string greeting = 5 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Hello {{.FirstName}} {{.LastName}},\""
max_length: 200;
}
];
string text = 6 [
(validate.rules).string = {max_len: 800},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Please use the \\\"Authenticate\\\" button or copy the one-time password {{.OTP}} and paste it to to the authentication screen in order to authenticate at ZITADEL within the next five minutes.\""
max_length: 800;
}
];
string button_text = 7 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Authenticate\""
max_length: 200;
}
];
string footer_text = 8 [(validate.rules).string = {max_len: 200}];
}
message SetCustomVerifyEmailOTPMessageTextResponse {
zitadel.v1.ObjectDetails details = 1;
}
message ResetCustomVerifyEmailOTPMessageTextToDefaultRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
}
message ResetCustomVerifyEmailOTPMessageTextToDefaultResponse {
zitadel.v1.ObjectDetails details = 1;
}
message GetCustomDomainClaimedMessageTextRequest { message GetCustomDomainClaimedMessageTextRequest {
string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}]; string language = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
} }