File

src/ui/builtin/login/smart-login.component.ts

Implements

OnInit

Metadata

selector login
styleUrls ./smart-login.component.css
templateUrl ./smart-login.component.html

Index

Properties
Methods

Constructor

constructor(smartServiceAdapter: SmartServiceAdapter, keycloakService: SmartKeycloakService, smartConfig: SmartConfig, route: ActivatedRoute, router: Router, secureable: SmartSecureableService, locationStrategy: LocationStrategy, navigationService: SmartNavigationService)
Parameters :
Name Type Optional
smartServiceAdapter SmartServiceAdapter No
keycloakService SmartKeycloakService No
smartConfig SmartConfig No
route ActivatedRoute No
router Router No
secureable SmartSecureableService No
locationStrategy LocationStrategy No
navigationService SmartNavigationService No

Methods

oidcLogin
oidcLogin(service: SmartSecureableAuthenticationServiceInfo)
Parameters :
Name Type Optional
service SmartSecureableAuthenticationServiceInfo No
Returns : void

Properties

authenticated
Type : boolean
buttons
Type : string
errorTitle
Type : string
Default value : 'Login failed. Please try again.'
generalError
Default value : false
generalErrorTitle
Type : string
Default value : 'Unable to login. The application server is not available.'
loginDialog
Type : SmartDialogComponent
Decorators :
@ViewChild(SmartDialogComponent, {static: true})
loginError
Default value : false
oidcServices
Type : SmartSecureableAuthenticationServiceInfo[]
password
Type : string
Public smartConfig
Type : SmartConfig
title
Type : string
Default value : 'Login'
userName
Type : string
<smart-dialog
    [title]="loginError || generalError ? (loginError ? errorTitle : generalErrorTitle) : title"
    [templateRef]="dialogTemplate"
    submit-on-enter="login"
    hideCloseButton="true"
    [width]="460"
    [buttons]="buttons">
</smart-dialog>
<ng-template #dialogTemplate>
            <form class="k-form-inline">
                <label class="k-form-field">
                    <span>Username</span>
                    <input #usernameInput class="k-textbox" type="text" name="username" [(ngModel)]="userName"/>
                </label>
                <label class="k-form-field">
                    <span>Password</span>
                    <input #passwordInput class="k-textbox" type="password" name="password" [(ngModel)]="password"/>
                </label>
                <label class="k-form-field oidc-services-wrap" *ngIf="oidcServices">
                    <span>Or sign in with:</span>
                    <button class="k-button oidc-service-button" *ngFor="let svc of oidcServices" (click)="oidcLogin(svc)">
                        <span *ngIf="svc.icon" [class]="'oidc-service-icon'">
                            <i *ngIf="svc.iconClass" [class]="svc.iconClass"></i>
                            <img class="oidc-service-icon-img" *ngIf="!svc.iconClass && svc.iconResourceURL" [src]="svc.iconResourceURL">
                        </span>
                        {{svc.name}}
                    </button>
                </label>
            </form>
</ng-template>

./smart-login.component.css

::ng-deep .k-button {
    text-transform: uppercase;
}

::ng-deep .oidc-service-icon-img {
    max-height: 25px;
    margin-right: 1rem;
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""