mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
37 lines
831 B
TypeScript
37 lines
831 B
TypeScript
import {AuthMethodType} from '../../../shared/log-in/methods/authMethods-type';
|
|
|
|
export class AuthMethodModel {
|
|
authMethodType: AuthMethodType;
|
|
location?: string;
|
|
|
|
constructor(authMethodName: string, location?: string) {
|
|
this.location = location;
|
|
switch (authMethodName) {
|
|
case 'ip': {
|
|
this.authMethodType = AuthMethodType.Ip;
|
|
break;
|
|
}
|
|
case 'ldap': {
|
|
this.authMethodType = AuthMethodType.Ldap;
|
|
break;
|
|
}
|
|
case 'shibboleth': {
|
|
this.authMethodType = AuthMethodType.Shibboleth;
|
|
break;
|
|
}
|
|
case 'x509': {
|
|
this.authMethodType = AuthMethodType.X509;
|
|
break;
|
|
}
|
|
case 'password': {
|
|
this.authMethodType = AuthMethodType.Password;
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|