UNPKG

innotec-auth-plugin

Version:

The Innotec-Auth-Plugin is designed to handle all authentication processes for applications where's conntected to the innotec v2 infrastructure. Theses plugin provides different authentication processes:

48 lines (39 loc) 1.31 kB
import { Component, Input, ElementRef } from '@angular/core'; import { I18nService } from '../services/i18n/i18n.service'; @Component({ selector: 'social-login-button', templateUrl: './socialbuttonlogin.component.pug', styleUrls: [ './socialbuttonlogin.component.sass'] }) export class SocialButtonLogin { @Input() social: string; iconclass: string; buttonclass: string; buttontext: string; constructor(public i18n: I18nService) { } ngOnInit() { switch (this.social) { case 'facebook': this.iconclass = 'icon-facebook'; this.buttonclass = 'loginBtn loginBtn--facebook'; this.buttontext = this.i18n.get('button.loginfacebook'); break; case 'google': this.iconclass = 'icon-google'; this.buttonclass = 'loginBtn loginBtn--google'; this.buttontext = this.i18n.get('button.logingoogle'); break; case 'paypal': this.iconclass = 'icon-paypal'; this.buttonclass = 'loginBtn loginBtn--paypal'; this.buttontext = this.i18n.get('button.loginpaypal'); break; case 'innotec': this.iconclass = 'icon-WERBASInnotec-icon'; this.buttonclass = 'loginBtn loginBtn--innotec'; this.buttontext = this.i18n.get('button.logininnotec'); break; } } }