mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-03 12:52:16 +00:00
# Which Problems Are Solved # How the Problems Are Solved # Additional Changes # Additional Context - Closes #10690
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
import {
|
|
APIAuthMethodType,
|
|
OIDCAuthMethodType,
|
|
OIDCGrantType,
|
|
OIDCResponseType,
|
|
} from 'src/app/proto/generated/zitadel/app_pb';
|
|
|
|
export interface RadioItemAuthType {
|
|
key: string;
|
|
titleI18nKey: string;
|
|
descI18nKey: string;
|
|
disabled: boolean;
|
|
prefix: string;
|
|
background: string;
|
|
responseType?: OIDCResponseType;
|
|
grantType?: OIDCGrantType[];
|
|
authMethod?: OIDCAuthMethodType;
|
|
apiAuthMethod?: APIAuthMethodType;
|
|
recommended?: boolean;
|
|
notRecommended?: boolean;
|
|
}
|
|
|
|
@Component({
|
|
selector: 'cnsl-auth-method-radio',
|
|
templateUrl: './app-auth-method-radio.component.html',
|
|
styleUrls: ['./app-auth-method-radio.component.scss'],
|
|
standalone: false,
|
|
})
|
|
export class AppAuthMethodRadioComponent {
|
|
@Input() current: string = '';
|
|
@Input() selected: string = '';
|
|
@Input() authMethods!: RadioItemAuthType[];
|
|
@Input() isOIDC: boolean = false;
|
|
@Input() compact: boolean = false;
|
|
@Output() selectedMethod: EventEmitter<string> = new EventEmitter();
|
|
|
|
public emitChange(): void {
|
|
this.selectedMethod.emit(this.selected);
|
|
}
|
|
}
|