UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

980 lines (935 loc) 44.5 kB
import * as i0 from '@angular/core'; import { SimpleChanges, OnInit, EventEmitter, OnChanges, AfterViewInit, TemplateRef, ChangeDetectorRef } from '@angular/core'; import * as i1 from '@c8y/ngx-components'; import { TenantUiService, AppStateService, ModalService, SimplifiedAuthService, AlertService, DateFormatService, TabFactory, Tab } from '@c8y/ngx-components'; import * as i2 from 'ngx-bootstrap/popover'; import * as _c8y_client from '@c8y/client'; import { ITenantLoginOption, IAuthenticationRestrictions, TenantLoginOptionType, ISessionConfiguration, TenantLoginOptionsService, TenantOptionsService, SystemOptionsService, TenantService, IResult, ITenantOption, TfaStrategy, IApplication, IUserGroup, IIdentified, ApplicationService, UserGroupService, InventoryRoleService } from '@c8y/client'; import { TranslateService } from '@ngx-translate/core'; import { ControlContainer, NgForm } from '@angular/forms'; import { Observable, BehaviorSubject, Subject, Subscription } from 'rxjs'; import * as i2$1 from 'ngx-bootstrap/tooltip'; import * as i4 from 'ngx-bootstrap/collapse'; import * as i5 from 'ngx-bootstrap/datepicker'; import * as i6 from '@c8y/ngx-components/assets-navigator'; import { PageChangedEvent } from 'ngx-bootstrap/pagination'; import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; import { Router } from '@angular/router'; interface TenantLoginOption extends Omit<ITenantLoginOption, 'authenticationRestrictions' | 'self' | 'strengthValidity' | 'tfaStrategy' | 'greenMinLength' | 'enforceStrength' | 'strengthValidity' | '_type'> { authenticationRestrictions?: AuthenticationRestrictions; } interface AuthenticationRestrictions extends Omit<IAuthenticationRestrictions, 'trustedUserAgents' | 'forbiddenUserAgents'> { trustedUserAgents: UserAgent[]; forbiddenUserAgents: UserAgent[]; } declare class UserAgent { readonly _id: string; value: string; constructor(value: string); get id(): string; private uniqueId; } interface AuthConfiguration { loginOptions: TenantLoginOption[]; systemOptions: Options; tenantOptions: Options; smsGatewayAvailable: boolean; preferredLoginOptionType: TenantLoginOptionType; } interface Options { [category: string]: { [key: string]: any; }; } declare class SessionConfigurationComponent { private tenantUiService; private translateService; authConfiguration: AuthConfiguration; tenantLoginOptionTypeEnum: typeof TenantLoginOptionType; ABSOLUTE_TIMEOUT_VALIDATION_MESSAGE: "The value must be greater than \"Token lifespan\" and not less than {{ minAbsoluteTimeout }}."; RENEWAL_TIMEOUT_VALIDATION_MESSAGE: "The value must be less than \"Token lifespan\"."; MAX_TOKEN_LIFESPAN_VALIDATION_MESSAGE: "The value must be less than \"Session absolute timeout\"."; MIN_TOKEN_LIFESPAN_VALIDATION_MESSAGE: "The value must be greater than \"Session renewal timeout\"."; USER_AGENT_VALIDATION_REQUIRED_POPOVER: "If selected, then every request needs to use the same \"User-Agent\" header as the first request which initiated the session."; private MIN_ABSOLUTE_TIMEOUT; private originalSessionConfiguration; private previousTokenLifespan; constructor(tenantUiService: TenantUiService, translateService: TranslateService); ngOnChanges(changes: SimpleChanges): void; get renewalTimeoutSeconds(): number; set renewalTimeoutSeconds(value: number); get absoluteTimeoutSeconds(): number; set absoluteTimeoutSeconds(value: number); get maximumNumberOfParallelSessions(): number; set maximumNumberOfParallelSessions(value: number); get userAgentValidationRequired(): boolean; set userAgentValidationRequired(value: boolean); get basicTokenLifespan(): any; set basicTokenLifespan(value: any); get useSessionConfiguration(): boolean; set useSessionConfiguration(value: boolean); get absoluteTimeoutConstraints(): { min: number; }; get renewalTimeoutConstraints(): { min: number; max: number; }; get basicTokenLifespanConstraints(): { min: number; max: number; }; get sessionConfiguration(): ISessionConfiguration; set sessionConfiguration(value: ISessionConfiguration); private convertToMillis; private convertToSeconds; static ɵfac: i0.ɵɵFactoryDeclaration<SessionConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SessionConfigurationComponent, "c8y-session-configuration", never, { "authConfiguration": { "alias": "authConfiguration"; "required": false; }; }, {}, never, never, true, never>; } declare class LoginSettingsComponent { private tenantUiService; PREFERRED_LOGIN_MODE_POPOVER: "Main difference is the storage of the authentication information. With Basic Auth, it is saved in a session storage and with OAI-Secure in a HttpOnly cookie. OAI-Secure grant is recommended as the authentication information is not accessible via JavaScript. Single sign-on redirect allows a user to login with a single 3rd-party authorization server using the OAuth2 protocol."; ENFORCED_BY_PLATFORM_POPOVER: "The setting is enforced on the platform level."; IGNORE_CASE_SENSITIVITY_POPOVER: "If selected, the letter case of the username does not matter during login."; authConfiguration: AuthConfiguration; isOauth2: boolean; tenantLoginOptionTypeEnum: typeof TenantLoginOptionType; private PASSWORD_CATEGORY; private LIMIT_VALIDITY_KEY; private TENANT_STRENGTH_VALIDITY_KEY; private SYSTEM_STRENGTH_VALIDITY_KEY; constructor(tenantUiService: TenantUiService); ngOnChanges(changes: SimpleChanges): void; get systemPasswordLimitValidity(): any; get passwordLimitValidity(): any; set passwordLimitValidity(value: any); get systemPasswordEnforceStrength(): any; get passwordEnforceStrength(): any; set passwordEnforceStrength(value: any); get tenantLoginIgnoreCase(): any; set tenantLoginIgnoreCase(value: any); static ɵfac: i0.ɵɵFactoryDeclaration<LoginSettingsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<LoginSettingsComponent, "c8y-login-settings", never, { "authConfiguration": { "alias": "authConfiguration"; "required": false; }; }, {}, never, never, true, never>; } declare class BasicAuthSettingsComponent { private controlContainer; authConfiguration: AuthConfiguration; preferredLoginOptionType: TenantLoginOptionType; tenantLoginOptionTypeEnum: typeof TenantLoginOptionType; constructor(controlContainer: ControlContainer); ngOnChanges(changes: SimpleChanges): void; ngDoCheck(): void; get forbiddenWebBrowsers(): boolean; set forbiddenWebBrowsers(value: boolean); forbiddenUserAgentsRemove(id: any): void; trustedUserAgentsRemove(id: any): void; get authenticationRestrictions(): AuthenticationRestrictions; add(collection: any): void; private remove; static ɵfac: i0.ɵɵFactoryDeclaration<BasicAuthSettingsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BasicAuthSettingsComponent, "c8y-basic-auth-settings", never, { "authConfiguration": { "alias": "authConfiguration"; "required": false; }; }, {}, never, never, true, never>; } declare class TenantLoginOptionMapper { mapTo(tenantLoginOption: ITenantLoginOption): TenantLoginOption; mapFrom(originalLoginOption: TenantLoginOption, newLoginOption: TenantLoginOption): ITenantLoginOption; private mapAuthenticationRestrictionsTo; private mapBasicLoginOption; private mapOauthInternalLoginOption; private mapAuthenticationRestrictionsFrom; private prapareTenantLoginOption; static ɵfac: i0.ɵɵFactoryDeclaration<TenantLoginOptionMapper, never>; static ɵprov: i0.ɵɵInjectableDeclaration<TenantLoginOptionMapper>; } declare class AuthConfigurationService { private tenantLoginOptionsService; private tenantOptionsService; private systemOptionsService; private appState; private tenantUiService; private tenantLoginOptionMapper; private tenantService; private systemOptionsWithDefaultValue; private tenantOptionsWithDefaultValue; constructor(tenantLoginOptionsService: TenantLoginOptionsService, tenantOptionsService: TenantOptionsService, systemOptionsService: SystemOptionsService, appState: AppStateService, tenantUiService: TenantUiService, tenantLoginOptionMapper: TenantLoginOptionMapper, tenantService: TenantService); getAuthConfiguration$(): Observable<AuthConfiguration>; save(newAuthConfiguration: AuthConfiguration, previousAuthConfiguration: AuthConfiguration): Promise<[IResult<ITenantLoginOption>, IResult<ITenantLoginOption>, ...IResult<ITenantOption>[]]>; private map; private saveOrUpdateLoginOption; private prepareBasicLoginOption; private prepareOauthInternalLoginOption; private originalLoginOptionWithDefaults; private getLoginOptionFromAuthConfiguration; private visibleOnLoginPage; private prepareTenantOptions; private getLoginOptions$; private getLoginOption; private getPreferredLoginOptionType$; private getTenantOptions$; private getSystemOptions$; /** * Returns an observable with fixed `two-factor-authentication.enforced` system option or null. * This method fixes problem with inconsistent value. System option `two-factor-authentication.enforced` is list of tenants when UI using boolean value. * This part will be removed after implementing new endpoint in MTM-50490. */ private fixTfaEnforcedSystemOption; /** * Returns a promise or null. * This method is needed now, because simply changing TFA strategy tenant option does not trigger all the necessary backend logic to apply the change, therefore, we need to call tenant's `/tfa` endpoint, which applies the change for all users in the tenant. * Within MTM-50490, we're going to simplify the process further by replacing multiple requests with one new endpoint that will handle saving of all authentication settings. */ private fixTfaStrategy; private isSmsApplicationAvailable$; private getOptionsObject; private getDefaultLoginOption; static ɵfac: i0.ɵɵFactoryDeclaration<AuthConfigurationService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AuthConfigurationService>; } declare class AuthConfigurationComponent implements OnInit { private authConfigurationService; private modalService; private authService; private alertService; reloading$: BehaviorSubject<boolean>; reload: EventEmitter<void>; authConfiguration: AuthConfiguration; private authConfiguration$; private previousAuthConfiguration; private authConfigurationSubscription; constructor(authConfigurationService: AuthConfigurationService, modalService: ModalService, authService: SimplifiedAuthService, alertService: AlertService); ngOnInit(): void; loadAuthConfig(): void; ngOnDestroy(): void; save(): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<AuthConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AuthConfigurationComponent, "c8y-auth-configuration", never, {}, {}, never, never, true, never>; } declare enum TfaStateEnum { TFA_UNDEFINED_BY_SYSTEM = 0, TFA_ENFORCED_FOR_GROUP = 1, TFA_ENABLED_BY_SYSTEM = 2, TFA_ENFORCED_BY_SYSTEM = 3 } declare class TfaSettingsComponent { authConfiguration: AuthConfiguration; preferredLoginOptionType: TenantLoginOptionType; smsGatewayAvailable: boolean; tfaStateEnum: typeof TfaStateEnum; tfaStrategyEnum: typeof TfaStrategy; tenantLoginOptionTypeEnum: typeof TenantLoginOptionType; TOTP_REQUIRES_OAUTH_POPOVER: "TOTP requires OAI-Secure login mode."; SMS_APP_NOT_SUBSCRIBED_POPOVER: "SMS strategy requires messaging application to be subscribed."; TFA_IS_ENFORCED_BY_SYSTEM_POPOVER: "The setting is enforced on the platform level."; TFA_IS_ENABLED_BY_SYSTEM_POPOVER: "The setting is enabled on the platform level."; TOKEN_VALIDITY_DETERMINED_BY_JWT_POPOVER: "In OAI-Secure login mode, the token's validity limit is determined by the JWT token and cannot be edited here."; TFA_IS_ENABLED_BY_ENFORCE_FOR_GROUP_POPOVER: "The setting is enabled on the platform level because it is enforced for particular roles."; ngOnChanges(changes: SimpleChanges): void; ngDoCheck(): void; get tenantTfaTokenValidity(): any; set tenantTfaTokenValidity(value: any); get tenantTfaPinValidity(): any; set tenantTfaPinValidity(value: any); get tenantTfaEnabled(): any; set tenantTfaEnabled(value: any); get tenantTfaEnforced(): any; set tenantTfaEnforced(value: any); get tenantTfaStrategy(): any; set tenantTfaStrategy(value: any); get systemTfaEnforcedGroup(): any; get systemTfaTenantScopeSettingEnabled(): any; get systemTfaEnabled(): any; get systemTfaEnforced(): any; get tfaState(): TfaStateEnum; get tfaBySmsCanBeSet(): boolean; get tfaByTotpCanBeSet(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<TfaSettingsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TfaSettingsComponent, "c8y-auth-tfa", never, { "authConfiguration": { "alias": "authConfiguration"; "required": false; }; }, {}, never, never, true, never>; } declare class BasicSettingsModule { static ɵfac: i0.ɵɵFactoryDeclaration<BasicSettingsModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<BasicSettingsModule, never, [typeof i1.CoreModule, typeof i2.PopoverModule, typeof SessionConfigurationComponent, typeof LoginSettingsComponent, typeof BasicAuthSettingsComponent, typeof AuthConfigurationComponent, typeof TfaSettingsComponent], never>; static ɵinj: i0.ɵɵInjectorDeclaration<BasicSettingsModule>; } declare class PaginatedListGroupComponent<T> implements OnInit, OnChanges, AfterViewInit { items: T[]; itemsPerPage: number; itemTemplate: TemplateRef<any>; currentPage: number; currentPageItems: T[]; private cdr; private host; private renderer; ngOnInit(): void; ngOnChanges(): void; ngAfterViewInit(): void; pageChanged(event: PageChangedEvent): void; updateCurrentPageItems(): void; getItemIndex(item: T): number; goToLastItem(): void; static ɵfac: i0.ɵɵFactoryDeclaration<PaginatedListGroupComponent<any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<PaginatedListGroupComponent<any>, "c8y-paginated-list-group", never, { "items": { "alias": "items"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; }, {}, ["itemTemplate"], never, true, never>; } declare enum TemplateType { CUSTOM = "CUSTOM", AZURE = "AZURE", KEYCLOAK = "KEYCLOAK" } declare enum ValidationMethod { USERINFO = "USERINFO", INTROSPECTION = "INTROSPECTION" } interface AccessTokenToUserDataMappings { firstNameClaimName?: string; lastNameClaimName?: string; emailClaimName?: string; phoneNumberClaimName?: string; } interface SSORequestParams { [key: string]: string; } interface Headers { [key: string]: string; } interface OnNewUser { dynamicMapping: DynamicMapping; } interface Configuration { mapRolesOnlyForNewUser: boolean; manageRolesOnlyFromAccessMapping: boolean; mapFromIdToken: boolean; } interface ChildPredicate { operator: 'EQ' | 'NEQ' | 'GT' | 'LT' | 'GTE' | 'LTE' | 'IN'; parameterPath: string; value: string; } interface WhenItemsAreMapped { childPredicates: ChildPredicate[]; operator: 'AND'; } interface AccessMapping { thenApplications: number[]; thenGroups: number[]; when: WhenItemsAreMapped; } interface DynamicMapping { configuration?: Configuration; mappings: AccessMapping[]; inventoryMappings: InventoryMapping[]; } interface InventoryMapping { when: WhenItemsAreMapped; thenInventoryRoles: InventoryRole[]; } interface InventoryRole { roleIds: number[]; managedObject: string; } interface CustomSignatureVerificationConfig { certIdFromField: boolean; certIdField?: string; certificates?: { [certIdValue: string]: Certificate; }; } interface Certificate { alg: 'PCKS' | 'RSA'; publicKey: string; validFrom?: Date; validTill?: Date; } interface AadSignatureVerificationConfig { publicKeyDiscoveryUrl: string; } interface JwksSignatureVerificationConfig { jwksUri: string; } interface AdfsSignatureVerificationConfig { manifestUrl: string; } interface SignatureVerificationConfig { manual?: CustomSignatureVerificationConfig; aad?: AadSignatureVerificationConfig; jwks?: JwksSignatureVerificationConfig; adfsManifest?: AdfsSignatureVerificationConfig; template?: string; } interface SSORequest { body?: string; headers: Headers; method: string; operation: string; requestParams: SSORequestParams; url?: string; } interface UserIdConfig { jwtField?: string; constantValue?: string; useConstantValue: boolean; } interface ExternalTokenConfig { enabled: boolean; userOrAppIdConfig?: UserIdConfig; validationMethod?: ValidationMethod; validationRequired?: boolean; tokenValidationRequest?: SSORequest; accessTokenValidityCheckIntervalInMinutes?: number; } interface SsoConfiguration extends ITenantLoginOption { accessTokenToUserDataMappings: AccessTokenToUserDataMappings; audience: string; authorizationRequest: SSORequest; buttonName: string; clientId: string; id?: string; issuer: string; logoutRequest: SSORequest; onNewUser: OnNewUser; providerName: string; redirectToPlatform: string; refreshRequest: SSORequest; self?: string; signatureVerificationConfig: SignatureVerificationConfig; template: TemplateType; tokenRequest: SSORequest; userIdConfig: UserIdConfig; visibleOnLoginPage: boolean; externalTokenConfig?: ExternalTokenConfig; useIdToken: boolean; } declare class SsoConfigurationService { private loginOptionsService; private ssoConfiguration$; private defaultConfiguration; constructor(loginOptionsService: TenantLoginOptionsService); getSsoConfiguration$(): Observable<ITenantLoginOption>; save(ssoConfiguration: SsoConfiguration): Promise<_c8y_client.IResult<ITenantLoginOption>>; static ɵfac: i0.ɵɵFactoryDeclaration<SsoConfigurationService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SsoConfigurationService>; } declare class SsoConfigurationComponent implements OnInit { private ssoConfigurationService; private applicationService; private userGroupService; private inventoryRoleService; private alertService; private modalService; private authService; private tenantUiService; apps: IApplication[]; groups: IUserGroup[]; inventoryRoles: IIdentified[]; ssoConfiguration: SsoConfiguration; templateType: typeof TemplateType; templateTypeConfig: { CUSTOM: { name: string; value: string; label: "Custom"; }; AZURE: { name: string; value: string; label: "Azure AD"; }; KEYCLOAK: { name: string; value: string; label: "Keycloak"; }; }; reloading$: BehaviorSubject<boolean>; reload: EventEmitter<void>; saveSubject: Subject<void>; ssoConfigurationForm: NgForm; private dataSubscription; private data$; constructor(ssoConfigurationService: SsoConfigurationService, applicationService: ApplicationService, userGroupService: UserGroupService, inventoryRoleService: InventoryRoleService, alertService: AlertService, modalService: ModalService, authService: SimplifiedAuthService, tenantUiService: TenantUiService); ngOnInit(): void; ngOnDestroy(): void; loadSsoConfiguration(): void; save(ssoConfiguration: any): Promise<void>; private getApplications; private getGroups; private getInventoryRoles; private warnAboutForceUsersLogOut; static ɵfac: i0.ɵɵFactoryDeclaration<SsoConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SsoConfigurationComponent, "c8y-sso-configuration", never, {}, {}, never, never, true, never>; } declare abstract class SsoConfigurationMapper<T> { abstract mapTo: (ssoConfiguration: SsoConfiguration) => T; abstract mapFrom: (templateModel: T) => SsoConfiguration; static ɵfac: i0.ɵɵFactoryDeclaration<SsoConfigurationMapper<any>, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SsoConfigurationMapper<any>>; } declare class RequestConfiguration { body?: string; headers: RequestConfigurationDynamicArray; method: string; operation: string; requestParams: RequestConfigurationDynamicArray; url?: string; constructor(requestConfiguration: SSORequest); toRequest(): SSORequest; } declare class RequestConfigurationDynamicArray extends Array { constructor(obj: SSORequestParams | Headers); toObject(): { [key: string]: string; }; } declare enum AlgorithmType { PCKS = "PCKS", RSA = "RSA" } declare enum CertificateType { CUSTOM = "CUSTOM", AZURE = "AZURE", ADFS = "ADFS", JWKS = "JWKS" } interface CustomCertificate { alg: AlgorithmType; key: string; publicKey: string; validFrom?: Date; validTill?: Date; } declare class SignatureConfiguration { manual?: CustomSignatureVerification; aad?: AadSignatureVerificationConfig; jwks?: JwksSignatureVerificationConfig; adfsManifest?: AdfsSignatureVerificationConfig; certificateTypeChosen: CertificateType; constructor(signatureVerificationConfig: SignatureVerificationConfig); toSignatureVerificationConfig(): SignatureVerificationConfig; getCertificateType(signatureVerificationConfig: SignatureVerificationConfig): CertificateType; } declare class CustomSignatureVerification { certIdFromField: boolean; certIdField: string; customCertificates: CustomCertificate[]; constructor(manual: CustomSignatureVerificationConfig); getCustomCertificates(manual: CustomSignatureVerificationConfig): any; addCustomCertificate(): void; removeCustomCertificate(customCertificate: CustomCertificate): void; toManual(): CustomSignatureVerificationConfig; getSignatureCertificates(): any; getManualSignatureVerificationConfig(): { certIdFromField: boolean; certIdField: string; }; } declare class ExternalToken { userOrAppIdConfig: UserIdConfig; validationMethod: ValidationMethod; validationRequired: boolean; enabled: boolean; tokenValidationRequest: RequestConfiguration; accessTokenValidityCheckIntervalInMinutes: number; constructor(externalTokenConfig: ExternalTokenConfig); toExternalTokenConfig(): ExternalTokenConfig; } interface CustomSsoConfiguration extends ITenantLoginOption { certificateType: CertificateType; accessTokenToUserDataMappings: AccessTokenToUserDataMappings; audience: string; authorizationRequest: RequestConfiguration; buttonName: string; clientId: string; issuer: string; logoutRequest: RequestConfiguration; onNewUser: OnNewUser; providerName: string; redirectToPlatform: string; refreshRequest: RequestConfiguration; signatureVerificationConfig: SignatureConfiguration; template: TemplateType; tokenRequest: RequestConfiguration; userIdConfig: UserIdConfig; visibleOnLoginPage: boolean; externalTokenConfig: ExternalToken; useIdToken: boolean; } declare class CustomConfigurationMapper implements SsoConfigurationMapper<CustomSsoConfiguration> { mapFrom(templateModel: CustomSsoConfiguration): SsoConfiguration; mapTo(ssoConfiguration: SsoConfiguration): CustomSsoConfiguration; static ɵfac: i0.ɵɵFactoryDeclaration<CustomConfigurationMapper, never>; static ɵprov: i0.ɵɵInjectableDeclaration<CustomConfigurationMapper>; } declare abstract class TemplateComponent<T> { protected configurationMapper: SsoConfigurationMapper<T>; templateModel: T; apps: IApplication[]; groups: IUserGroup[]; inventoryRoles: IIdentified[]; ssoConfiguration: SsoConfiguration; ssoConfigurationChangeTrigger: Observable<void>; ssoConfigurationChange: EventEmitter<SsoConfiguration>; triggerSubscription: Subscription; protected constructor(configurationMapper: SsoConfigurationMapper<T>); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private mapSsoConfiguration; private emitSsoConfiguration; static ɵfac: i0.ɵɵFactoryDeclaration<TemplateComponent<any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TemplateComponent<any>, "ng-component", never, { "apps": { "alias": "apps"; "required": false; }; "groups": { "alias": "groups"; "required": false; }; "inventoryRoles": { "alias": "inventoryRoles"; "required": false; }; "ssoConfiguration": { "alias": "ssoConfiguration"; "required": false; }; "ssoConfigurationChangeTrigger": { "alias": "ssoConfigurationChangeTrigger"; "required": false; }; }, { "ssoConfigurationChange": "ssoConfigurationChange"; }, never, never, true, never>; } declare class CustomTemplateComponent extends TemplateComponent<CustomSsoConfiguration> { private customConfigurationMapper; constructor(customConfigurationMapper: CustomConfigurationMapper); static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplateComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<CustomTemplateComponent, "c8y-custom-template", never, {}, {}, never, never, true, never>; } interface KeyCloakConfiguration { keyCloakAddress: string; realmName: string; clientId: string; clientSecret: string; scopeId: string; buttonName: string; userIdConfig: UserIdConfig; onNewUser: OnNewUser; redirectToPlatform: string; audience: string; logoutRequest: RequestConfiguration; visibleOnLoginPage: boolean; accessTokenToUserDataMappings: AccessTokenToUserDataMappings; externalTokenConfig: ExternalToken; useIdToken: boolean; } declare class KeyCloakConfigurationMapper implements SsoConfigurationMapper<KeyCloakConfiguration> { private urlPattern; mapFrom(templateModel: KeyCloakConfiguration): SsoConfiguration; mapTo(ssoConfiguration: SsoConfiguration): KeyCloakConfiguration; private getKeyCloakAddressFromUrl; private getRealmName; private getClientSecret; private getClientSecretFromBody; private getFirstDefined; private getScopeId; static ɵfac: i0.ɵɵFactoryDeclaration<KeyCloakConfigurationMapper, never>; static ɵprov: i0.ɵɵInjectableDeclaration<KeyCloakConfigurationMapper>; } declare class KeyCloakTemplateComponent extends TemplateComponent<KeyCloakConfiguration> { private keyCloakConfigurationMapper; constructor(keyCloakConfigurationMapper: KeyCloakConfigurationMapper); static ɵfac: i0.ɵɵFactoryDeclaration<KeyCloakTemplateComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<KeyCloakTemplateComponent, "c8y-key-cloak-template", never, {}, {}, never, never, true, never>; } interface AadConfiguration { aadAddress: string; tenant: string; applicationId: string; redirectToPlatform: string; clientSecret: string; issuer: string; buttonName: string; visibleOnLoginPage: boolean; redirectAfterLogout: boolean; redirectAfterLogoutUrl: string; accessTokenToUserDataMappings: AccessTokenToUserDataMappings; userIdConfig: { jwtField: string; }; onNewUser: OnNewUser; publicKeyDiscoveryUrl: string; signatureVerificationConfig: SignatureConfiguration; externalTokenConfig: ExternalToken; useIdToken: boolean; } declare class AadConfigurationMapper implements SsoConfigurationMapper<AadConfiguration> { private defaults; private urlPattern; mapFrom(templateModel: AadConfiguration): SsoConfiguration; mapTo(ssoConfiguration: SsoConfiguration): AadConfiguration; private setupDefaults; private getAadAddress; private getTenant; private getUrlsFromRequests; private getAadAddressFromUrl; private getTenantFromUrl; private getClientSecret; private getClientSecretFromBody; private setupUserIdConfig; private setupSignatureVerificationConfig; private getRedirectAfterLogout; private getRedirectAfterLogoutUrl; private getFirstDefined; private getQueryString; static ɵfac: i0.ɵɵFactoryDeclaration<AadConfigurationMapper, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AadConfigurationMapper>; } declare class AadTemplateComponent extends TemplateComponent<AadConfiguration> { private aadConfigurationMapper; constructor(aadConfigurationMapper: AadConfigurationMapper); static ɵfac: i0.ɵɵFactoryDeclaration<AadTemplateComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AadTemplateComponent, "c8y-aad-template", never, {}, {}, never, never, true, never>; } declare class BasicConfigurationComponent implements OnChanges { private tenantService; templateModel: any; REDIRECT_TO_THE_USER_INTERFACE_APPLICATION_TOOLTIP: "The redirect URL is automatically set to the application used by the user. In case of an error, it will be correctly displayed on the application's page."; redirectToPlatformWarningParams: { defaultRedirectUrl: string; host?: string; }; flowControlledByUI: boolean; redirectToPlatform: string; constructor(tenantService: TenantService); shouldShow(field: string): boolean; ngOnChanges(): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<BasicConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BasicConfigurationComponent, "c8y-basic-configuration", never, { "templateModel": { "alias": "templateModel"; "required": false; }; }, {}, never, never, true, never>; } declare class RequestConfigurationComponent { private controlContainer; templateModel: any; requestName: string; requestType: 'authorizationRequest' | 'tokenRequest' | 'refreshRequest' | 'logoutRequest' | 'tokenValidationRequest'; constructor(controlContainer: ControlContainer); shouldShow(field: string): boolean; get requestConfiguration(): any; addCustomValue(array: any): void; removeCustomValue(array: any, customValue: any): void; get showBody(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<RequestConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<RequestConfigurationComponent, "c8y-request-configuration", never, { "templateModel": { "alias": "templateModel"; "required": false; }; "requestName": { "alias": "requestName"; "required": false; }; "requestType": { "alias": "requestType"; "required": false; }; }, {}, never, never, true, never>; } declare class UserIdConfigurationComponent implements OnInit { private static id; userIdConfig: any; withHeader: boolean; componentId: number; shouldShow(field: string): boolean; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<UserIdConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<UserIdConfigurationComponent, "c8y-user-id-configuration", never, { "userIdConfig": { "alias": "userIdConfig"; "required": false; }; "withHeader": { "alias": "withHeader"; "required": false; }; }, {}, never, never, true, never>; } declare class UserDataMappingComponent { private controlContainer; templateModel: any; CLAIM_NAMES: "Token claims can be checked in Audit Logs under Single sign-on type."; RETRIVE_FROM_ACCESS_TOKEN: "Retrieve from Access token"; RETRIVE_FROM_ID_TOKEN: "Retrieve from ID token"; constructor(controlContainer: ControlContainer); ngAfterContentInit(): void; get useIdToken(): any; setUseIdToken(useIdToken: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<UserDataMappingComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<UserDataMappingComponent, "c8y-sso-user-data-mapping", never, { "templateModel": { "alias": "templateModel"; "required": false; }; }, {}, never, never, true, never>; } declare class AccessMappingComponent { private controlContainer; private cdr; apps: IApplication[]; groups: IUserGroup[]; inventoryRoles: IIdentified[]; templateModel: any; paginatedAccessMappings: PaginatedListGroupComponent<AccessMapping>; paginatedInventoryMappings: PaginatedListGroupComponent<InventoryMapping>; USE_ACCESS_MAPPING_ON_USER_CREATION_TOOLTIP: "The access mapping will be executed only once during the first login, then the administrator can edit the user roles. During the next login, these mappings will not be executed."; USE_ACCESS_MAPPING_ON_USER_CREATION_OPTION: "Use dynamic access mapping only on user creation"; UPDATE_ROLES_LISTED_IN_ACCESS_MAPPING_ON_EACH_LOG_IN_TOOLTIP: "The access mapping will be executed only once during the first login, then the administrator can edit the user roles. During the next login only the roles listed in the access mappings will be updated."; UPDATE_ROLES_LISTED_IN_ACCESS_MAPPING_ON_EACH_LOG_IN_OPTION: "Roles selected in the rules below will be reassigned to a user on each log in and other ones will be unchanged"; CLEAR_AND_UPDATED_ROLES_ON_EACH_LOG_IN_TOOLTIP: "The access mapping will be executed during the first login. The administrator cannot edit the SSO user roles. During the next login all the roles will be cleared and the mapping will be executed again."; CLEAR_AND_UPDATED_ROLES_ON_EACH_LOG_IN_OPTION: "Roles selected in the rules below will be reassigned to a user on each log in and other ones will be cleared"; RETRIVE_FROM_ACCESS_TOKEN: "Retrieve from Access token"; RETRIVE_FROM_ID_TOKEN: "Retrieve from ID token"; constructor(controlContainer: ControlContainer, cdr: ChangeDetectorRef); ngOnChanges(): void; addAccessMapping(): void; addInventoryMapping(): void; onRemove(accessMapping: AccessMapping): void; onRemoveInventoryMapping(inventoryMapping: InventoryMapping): void; setDynamicMappingConfiguration(mapRolesOnlyForNewUser: boolean, manageRolesOnlyFromAccessMapping?: boolean): void; get mapRolesOnlyForNewUser(): any; get manageRolesOnlyFromAccessMapping(): any; get mapFromIdToken(): any; setMapFromIdToken(mapFromIdToken: any): void; private get dynamicMappingConfiguration(); private setDynamicMapping; static ɵfac: i0.ɵɵFactoryDeclaration<AccessMappingComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AccessMappingComponent, "c8y-sso-access-mapping", never, { "apps": { "alias": "apps"; "required": false; }; "groups": { "alias": "groups"; "required": false; }; "inventoryRoles": { "alias": "inventoryRoles"; "required": false; }; "templateModel": { "alias": "templateModel"; "required": false; }; }, {}, never, never, true, never>; } declare class DynamicAccessMappingComponent { controlContainer: ControlContainer; groups: IUserGroup[]; selectedGroups: IUserGroup[]; apps: IApplication[]; selectedApps: IApplication[]; accessMapping: AccessMapping; onRemoveAccessMapping: EventEmitter<AccessMapping>; accessMappingIndex: number; constructor(controlContainer: ControlContainer); ngOnChanges(): void; onRemoveAllChildPredicates(): void; getIds(selectedItems: any): any; private setSelectedItems; static ɵfac: i0.ɵɵFactoryDeclaration<DynamicAccessMappingComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DynamicAccessMappingComponent, "c8y-sso-dynamic-access-mapping", never, { "groups": { "alias": "groups"; "required": false; }; "apps": { "alias": "apps"; "required": false; }; "accessMapping": { "alias": "accessMapping"; "required": false; }; "accessMappingIndex": { "alias": "accessMappingIndex"; "required": false; }; }, { "onRemoveAccessMapping": "onRemoveAccessMapping"; }, never, never, true, never>; } declare class SignatureConfigurationComponent implements OnInit { protected controlContainer: ControlContainer; private dateFormatService; templateModel: any; certificateType: typeof CertificateType; certificateTypes: { CUSTOM: { name: string; label: "Custom"; value: string; signatureVerificationConfigFragment: string; ordinal: number; }; AZURE: { name: string; label: string; value: string; signatureVerificationConfigFragment: string; ordinal: number; }; ADFS: { name: string; label: "ADFS manifest"; value: string; signatureVerificationConfigFragment: string; ordinal: number; }; JWKS: { name: string; label: string; value: string; signatureVerificationConfigFragment: string; ordinal: number; }; }; algorithmTypes: { PCKS: { name: string; value: string; label: "X.509 certificate (PEM format)"; }; RSA: { name: string; value: string; label: "RSA public key (X.509 Subject Public Key Info)"; }; }; dateInputFormat: string; CERTIFICATE_ID_FIELD_POPOVER: "This is the name of the field in the token whose value will be used to select one of the certificates below which has matching \"Certificate ID value\"."; constructor(controlContainer: ControlContainer, dateFormatService: DateFormatService); ngOnInit(): void; shouldShow(field: string): boolean; removeCustomCertificate(customCertificate: CustomCertificate): void; static ɵfac: i0.ɵɵFactoryDeclaration<SignatureConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SignatureConfigurationComponent, "c8y-sso-signature-configuration", never, { "templateModel": { "alias": "templateModel"; "required": false; }; }, {}, never, never, true, never>; } declare class LogoutConfigurationComponent { templateModel: any; static ɵfac: i0.ɵɵFactoryDeclaration<LogoutConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<LogoutConfigurationComponent, "c8y-sso-logout-configuration", never, { "templateModel": { "alias": "templateModel"; "required": false; }; }, {}, never, never, true, never>; } declare class ChildPredicatesComponent { private controlContainer; childPredicates: ChildPredicate[]; accessMappingIndex: string; onRemoveAllChildPredicates: EventEmitter<null>; relations: { name: string; value: string; label: string; ordinal: number; }[]; constructor(controlContainer: ControlContainer); removeChildPredicate(childPredicate: ChildPredicate): void; addChildPredicate(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ChildPredicatesComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ChildPredicatesComponent, "c8y-sso-child-predicates", never, { "childPredicates": { "alias": "childPredicates"; "required": false; }; "accessMappingIndex": { "alias": "accessMappingIndex"; "required": false; }; }, { "onRemoveAllChildPredicates": "onRemoveAllChildPredicates"; }, never, never, true, never>; } declare class InventoryRolesMappingComponent { controlContainer: ControlContainer; private bsModal; inventoryMapping: InventoryMapping; inventoryMappingIndex: number; inventoryRoles: IIdentified[]; selectedInventoryRoles: IIdentified[]; onRemoveInventoryMapping: EventEmitter<InventoryMapping>; constructor(controlContainer: ControlContainer, bsModal: BsModalService); ngOnChanges(): void; onRemoveAllChildPredicates(): void; getIds(selectedItems: IIdentified[]): (string | number)[]; removeInventoryRole(inventoryRole: InventoryRole): void; addInventoryRoles(): void; private setSelectedInventoryRoles; static ɵfac: i0.ɵɵFactoryDeclaration<InventoryRolesMappingComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<InventoryRolesMappingComponent, "c8y-sso-inventory-roles-mapping", never, { "inventoryMapping": { "alias": "inventoryMapping"; "required": false; }; "inventoryMappingIndex": { "alias": "inventoryMappingIndex"; "required": false; }; "inventoryRoles": { "alias": "inventoryRoles"; "required": false; }; }, { "onRemoveInventoryMapping": "onRemoveInventoryMapping"; }, never, never, true, never>; } declare class InventoryRolesModalComponent { modal: BsModalRef; selectedGroups: IIdentified[]; resultEmitter: EventEmitter<IIdentified[]>; label: "Groups"; constructor(modal: BsModalRef); dismiss(): void; select(): void; static ɵfac: i0.ɵɵFactoryDeclaration<InventoryRolesModalComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<InventoryRolesModalComponent, "c8y-sso-inventory-roles-modal", never, {}, {}, never, never, true, never>; } declare class ExternalTokenConfigComponent { templateModel: any; validationMethods: { INTROSPECTION: { name: string; value: string; label: "Introspection`Method of validating access token from external IAM system`"; defaults: { method: string; body: string; url: string; headers: {}; operation: string; requestParams: {}; }; }; USERINFO: { name: string; value: string; label: "User info`Method of validating access token from external IAM system`"; defaults: { url: string; method: string; body: string; headers: { Authorization: string; }; operation: string; requestParams: {}; }; }; }; get externalTokenConfig(): any; onValidationMethodChange(event: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<ExternalTokenConfigComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ExternalTokenConfigComponent, "c8y-external-token-config", never, { "templateModel": { "alias": "templateModel"; "required": false; }; }, {}, never, never, true, never>; } declare class SsoConfigurationModule { static ɵfac: i0.ɵɵFactoryDeclaration<SsoConfigurationModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SsoConfigurationModule, never, [typeof i1.CoreModule, typeof i2$1.TooltipModule, typeof i2.PopoverModule, typeof i4.CollapseModule, typeof i5.BsDatepickerModule, typeof i6.AssetSelectorModule, typeof PaginatedListGroupComponent, typeof SsoConfigurationComponent, typeof CustomTemplateComponent, typeof KeyCloakTemplateComponent, typeof AadTemplateComponent, typeof BasicConfigurationComponent, typeof RequestConfigurationComponent, typeof UserIdConfigurationComponent, typeof UserDataMappingComponent, typeof AccessMappingComponent, typeof DynamicAccessMappingComponent, typeof SignatureConfigurationComponent, typeof LogoutConfigurationComponent, typeof ChildPredicatesComponent, typeof InventoryRolesMappingComponent, typeof InventoryRolesModalComponent, typeof ExternalTokenConfigComponent], [typeof SsoConfigurationComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<SsoConfigurationModule>; } declare class AuthConfigurationModule { static ɵfac: i0.ɵɵFactoryDeclaration<AuthConfigurationModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<AuthConfigurationModule, never, [typeof BasicSettingsModule, typeof SsoConfigurationModule], never>; static ɵinj: i0.ɵɵInjectorDeclaration<AuthConfigurationModule>; } declare class AuthConfigurationTabsFactory implements TabFactory { router: Router; private ssoConfigurationService; constructor(router: Router, ssoConfigurationService: SsoConfigurationService); get(): Observable<Tab[]>; static ɵfac: i0.ɵɵFactoryDeclaration<AuthConfigurationTabsFactory, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AuthConfigurationTabsFactory>; } export { AuthConfigurationModule, AuthConfigurationTabsFactory }; //# sourceMappingURL=index.d.ts.map