core/login/totp-auth.component.ts
| selector | c8y-totp-auth |
| templateUrl | ./totp-auth.component.html |
Properties |
Methods |
|
Inputs |
Outputs |
constructor(loginService: LoginService, userService: UserService, alert: AlertService)
|
||||||||||||
|
Parameters :
|
| credentials |
Type : ICredentials
|
| view |
Type : LoginViews
|
| onCancel |
Type : EventEmitter
|
| Async ngOnInit |
ngOnInit()
|
|
In case of a setup we need the user to be authorized first.
Returns :
any
|
| Async onTotpSuccess | ||||
onTotpSuccess(code)
|
||||
|
Parameters :
Returns :
any
|
| hasError |
Default value : false
|
| isSetup |
Default value : false
|
| loading |
Default value : false
|
| LOGIN_VIEWS |
Default value : LoginViews
|
| Public loginService |
Type : LoginService
|
<div
class="legend form-block center"
translate
>
Two-factor authentication
</div>
<c8y-totp-setup *ngIf="isSetup">
</c8y-totp-setup>
<c8y-totp-challenge
[loading]="loading"
[hasError]="hasError"
[verify]="view === LOGIN_VIEWS.TotpSetup"
(onSuccess)="onTotpSuccess($event)"
></c8y-totp-challenge>
<div class="text-center m-t-8">
<a
title="{{ 'Cancel' | translate }}"
class="btn btn-link btn-sm"
(click)="onCancel.emit()"
translate
>
Cancel
</a>
</div>