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:
64 lines (55 loc) • 1.61 kB
text/typescript
import { Component, Input, trigger, state, style, transition, animate } from '@angular/core';
import { ModuleOptions } from '../services/moduleoptions/moduleoptions.service';
import { I18nService } from '../services/i18n/i18n.service';
export class LoginField {
myValue: String = 'abc';
innoteclogin: String = 'active';
authproviders: String = 'inactive';
fielddescription: String = this.i18n.get('description.sociallogin');
active: Boolean = false;
subscription: any;
set open(open: boolean) {
if (open) {
this.setActive();
} else {
this.setInActive();
}
}
constructor(private moduleOptions: ModuleOptions,
private i18n: I18nService) {
}
openInnotec() {
this.authproviders = 'active';
this.innoteclogin = 'inactive';
this.fielddescription = this.i18n.get('description.innoteclogin');
}
openSocial() {
this.authproviders = 'inactive';
this.innoteclogin = 'active';
this.fielddescription = this.i18n.get('description.sociallogin');
}
setActive() {
this.active = true;
}
setInActive() {
this.active = false;
}
}