mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
First functional prototype
This commit is contained in:
@@ -1,9 +1,33 @@
|
||||
export class AuthMethodModel {
|
||||
authMethodName: string;
|
||||
location?: string;
|
||||
authMethodConstant: AuthMethodConstants
|
||||
|
||||
constructor(authMethodName: string, location?: string) {
|
||||
this.authMethodName = authMethodName;
|
||||
this.location = location;
|
||||
switch (authMethodName) {
|
||||
case 'password': {
|
||||
this.authMethodConstant = AuthMethodConstants.PASSWORD;
|
||||
break;
|
||||
}
|
||||
case 'shibboleth': {
|
||||
this.authMethodConstant = AuthMethodConstants.SHIBBOLETH;
|
||||
break;
|
||||
}
|
||||
case 'ldap': {
|
||||
this.authMethodConstant = AuthMethodConstants.LDAP;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export enum AuthMethodConstants {
|
||||
PASSWORD,
|
||||
SHIBBOLETH,
|
||||
LDAP
|
||||
}
|
||||
|
Reference in New Issue
Block a user