Add authentication getter and setter to request context for plugins.

This commit is contained in:
Samir Nijenhuis committed 2019-02-27 20:43:31 +01:00
1 parent 9d3e2f4424
commit 0bab48e3e5
1 file changed
+10
@@ -131,6 +131,15 @@ export function init(
}
},
setAuthentication(name : string, value: string) : void {
renderedRequest.authentication[name] = value;
},
getAuthentication() : Object {
return renderedRequest.authentication;
}
// NOTE: For these to make sense, we'd need to account for cookies in the jar as well
// addCookie (name: string, value: string): void {}
// getCookie (name: string): string | null {}
@@ -152,6 +161,7 @@ export function init(
delete request.setParameter;
delete request.addParameter;
delete request.addParameter;
delete request.setAuthentication;
}
return { request };