File

core/login/totp-auth.component.ts

Implements

OnInit

Metadata

selector c8y-totp-auth
templateUrl ./totp-auth.component.html

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(loginService: LoginService, userService: UserService, alert: AlertService)
Parameters :
Name Type Optional
loginService LoginService No
userService UserService No
alert AlertService No

Inputs

credentials

Type : ICredentials

view

Type : LoginViews

Outputs

onCancel $event Type: EventEmitter

Methods

Async ngOnInit
ngOnInit()

In case of a setup we need the user to be authorized first.

Returns : any
Async onTotpSuccess
onTotpSuccess(code)
Parameters :
Name Optional
code No
Returns : any

Properties

hasError
hasError:
Default value : false
isSetup
isSetup:
Default value : false
loading
loading:
Default value : false
LOGIN_VIEWS
LOGIN_VIEWS:
Default value : LoginViews
Public loginService
loginService: 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>

result-matching ""

    No results matching ""