forked from hazza/dspace-angular
17 lines
437 B
TypeScript
17 lines
437 B
TypeScript
import { AuthMethodType } from './authMethods-type';
|
|
|
|
const authMethodsMap = new Map();
|
|
|
|
export function renderAuthMethodFor(authMethodType: AuthMethodType) {
|
|
return function decorator(objectElement: any) {
|
|
if (!objectElement) {
|
|
return;
|
|
}
|
|
authMethodsMap.set(authMethodType, objectElement);
|
|
};
|
|
}
|
|
|
|
export function rendersAuthMethodType(authMethodType: AuthMethodType) {
|
|
return authMethodsMap.get(authMethodType);
|
|
}
|