mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-26 08:38:58 -04:00
Add authentication getter and setter to request context for plugins.
This commit is contained in:
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 };
|
||||
|
||||
Reference in new issue
Block a user