auth-configuration/basic-settings/basic-auth-settings.component.ts
selector | c8y-basic-auth-settings |
templateUrl | ./basic-auth-settings.component.html |
viewProviders |
|
Properties |
Methods |
Inputs |
Accessors |
constructor(controlContainer: ControlContainer)
|
||||||
Parameters :
|
authConfiguration |
Type : AuthConfiguration
|
add | ||||
add(collection)
|
||||
Parameters :
Returns :
void
|
forbiddenUserAgentsRemove | ||||
forbiddenUserAgentsRemove(id)
|
||||
Parameters :
Returns :
void
|
ngDoCheck |
ngDoCheck()
|
Returns :
void
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
trustedUserAgentsRemove | ||||
trustedUserAgentsRemove(id)
|
||||
Parameters :
Returns :
void
|
preferredLoginOptionType |
Type : TenantLoginOptionType
|
Default value : TenantLoginOptionType.BASIC
|
tenantLoginOptionTypeEnum |
Default value : TenantLoginOptionType
|
forbiddenWebBrowsers | ||||||
getforbiddenWebBrowsers()
|
||||||
setforbiddenWebBrowsers(value: boolean)
|
||||||
Parameters :
Returns :
void
|
authenticationRestrictions |
getauthenticationRestrictions()
|
<div
class="card-block separator-top"
*ngIf="authConfiguration.preferredLoginOptionType !== 'BASIC'"
>
<div class="col-sm-2">
<div class="h4 text-normal text-right text-left-xs">
{{ 'Basic Auth restrictions' | translate }}
</div>
</div>
<div class="col-sm-9">
<div class="row">
<div class="col-sm-6">
<c8y-form-group>
<label class="c8y-switch" title="{{ 'Forbidden for web browsers' | translate }}">
<input type="checkbox" name="forbiddenWebBrowsers" [(ngModel)]="forbiddenWebBrowsers" />
<span></span>
<span>{{ 'Forbidden for web browsers' | translate }}</span>
</label>
<div
class="alert alert-warning"
*ngIf="
preferredLoginOptionType === tenantLoginOptionTypeEnum.BASIC && forbiddenWebBrowsers
"
>
{{
'You are about to forbid browsers from using Basic authentication. This will prevent users from using web applications on your tenant because you are going to set Basic authentication as the preferred login mode.'
| translate
}}
</div>
</c8y-form-group>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label title="{{ 'Forbidden user agents' | translate }}">
{{ 'Forbidden user agents' | translate }}
</label>
<div
class="input-group m-t-8"
*ngFor="
let forbiddenUserAgent of authenticationRestrictions.forbiddenUserAgents;
last as isLast;
first as isFirst
"
>
<input
type="text"
[name]="'forbiddenUserAgent' + forbiddenUserAgent.id"
[(ngModel)]="forbiddenUserAgent.value"
class="form-control"
data-cy="c8y-basic-auth--forbidden-agent"
placeholder="{{ 'e.g.' | translate }} forbidden-agent"
/>
<div class="input-group-btn col-sm-2">
<button
*ngIf="!(isFirst && isLast && forbiddenUserAgent.value === '')"
title="{{ 'Remove' | translate }}"
[name]="'forbiddenUserAgentRemove' + forbiddenUserAgent.id"
type="button"
class="btn btn-dot text-primary"
(click)="forbiddenUserAgentsRemove(forbiddenUserAgent.id)"
>
<i class="dlt-c8y-icon-minus-circle text-danger"></i>
</button>
<button
title="{{ 'Add' | translate }}"
type="button"
class="btn btn-dot text-primary"
(click)="add(authenticationRestrictions.forbiddenUserAgents)"
*ngIf="isLast"
>
<i class="dlt-c8y-icon-plus-circle"></i>
</button>
</div>
</div>
</div>
<div class="col-sm-6">
<label title="{{ 'Trusted user agents' | translate }}">
{{ 'Trusted user agents' | translate }}
</label>
<div
class="input-group m-t-8"
*ngFor="
let trustedUserAgent of authenticationRestrictions.trustedUserAgents;
last as isLast;
first as isFirst
"
>
<input
type="text"
[name]="'trustedUserAgent' + trustedUserAgent.id"
class="form-control"
placeholder="{{ 'e.g.' | translate }} trusted-agent"
data-cy="c8y-basic-auth--trusted-agent"
[(ngModel)]="trustedUserAgent.value"
/>
<div class="input-group-btn col-sm-2">
<button
*ngIf="!(isFirst && isLast && trustedUserAgent.value === '')"
title="{{ 'Remove' | translate }}"
[name]="'trustedUserAgentRemove' + trustedUserAgent.id"
type="button"
class="btn btn-dot btn-dot--danger text-primary"
(click)="trustedUserAgentsRemove(trustedUserAgent.id)"
>
<i class="dlt-c8y-icon-minus-circle"></i>
</button>
<button
title="{{ 'Add' | translate }}"
type="button"
(click)="add(authenticationRestrictions.trustedUserAgents)"
class="btn btn-dot text-primary"
*ngIf="isLast"
>
<i class="dlt-c8y-icon-plus-circle"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>