mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
45 lines
956 B
TypeScript
45 lines
956 B
TypeScript
export class AuthMethodModel {
|
|
authMethodName: string;
|
|
location?: string;
|
|
authMethodConstant: AuthMethodConstants
|
|
|
|
constructor(authMethodName: string, location?: string) {
|
|
this.authMethodName = authMethodName;
|
|
this.location = location;
|
|
switch (authMethodName) {
|
|
case 'ip': {
|
|
this.authMethodConstant = AuthMethodConstants.IP;
|
|
break;
|
|
}
|
|
case 'ldap': {
|
|
this.authMethodConstant = AuthMethodConstants.LDAP;
|
|
break;
|
|
}
|
|
case 'shibboleth': {
|
|
this.authMethodConstant = AuthMethodConstants.SHIBBOLETH;
|
|
break;
|
|
}
|
|
case 'x509': {
|
|
this.authMethodConstant = AuthMethodConstants.X509;
|
|
break;
|
|
}
|
|
case 'password': {
|
|
this.authMethodConstant = AuthMethodConstants.PASSWORD;
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
export enum AuthMethodConstants {
|
|
IP,
|
|
LDAP,
|
|
SHIBBOLETH,
|
|
X509,
|
|
PASSWORD,
|
|
}
|