Removed switch statement, changed AuthMethod parsing in authInterceptor to be more generic

This commit is contained in:
Julius Gruber
2019-09-02 15:01:03 +02:00
parent beb0f2d410
commit 901951eaa8
12 changed files with 94 additions and 58 deletions

View File

@@ -1,6 +1,6 @@
<div>
<a class="btn btn-lg btn-primary btn-block mt-3" type="submit"
[href]="injectedShibbolethUrl"
[href]="authMethodModel.location"
role="button"
>{{"login.shibboleth" | translate}}</a>
</div>

View File

@@ -12,14 +12,17 @@ import { AuthMethodModel } from '../../../../core/auth/models/auth-method.model'
@renderAuthMethodFor(AuthMethodType.Shibboleth)
export class DynamicShibbolethComponent implements OnInit {
@Input()authMethodModel: AuthMethodModel;
/**
* @constructor
*/
constructor(@Inject('authMethodProvider') public injectedObject: AuthMethodModel) {
constructor(@Inject('authMethodModelProvider') public injectedAuthMethodModel: AuthMethodModel) {
this.authMethodModel = injectedAuthMethodModel;
}
ngOnInit(): void {
console.log('injectedObject', this.injectedObject)
}
console.log('injectedAuthMethodModel', this.injectedAuthMethodModel);
}
}