aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/core/plugins/plugin.service.ts7
-rw-r--r--client/src/types/register-client-option.model.ts2
2 files changed, 9 insertions, 0 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index ee80d4d39..6a1a46e73 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -271,6 +271,13 @@ export class PluginService implements ClientHook {
271 return this.authService.isLoggedIn() 271 return this.authService.isLoggedIn()
272 }, 272 },
273 273
274 getAuthHeader: () => {
275 if (!this.authService.isLoggedIn()) return undefined
276
277 const value = this.authService.getRequestHeaderValue()
278 return { 'Authorization': value }
279 },
280
274 notifier: { 281 notifier: {
275 info: (text: string, title?: string, timeout?: number) => this.notifier.info(text, title, timeout), 282 info: (text: string, title?: string, timeout?: number) => this.notifier.info(text, title, timeout),
276 error: (text: string, title?: string, timeout?: number) => this.notifier.error(text, title, timeout), 283 error: (text: string, title?: string, timeout?: number) => this.notifier.error(text, title, timeout),
diff --git a/client/src/types/register-client-option.model.ts b/client/src/types/register-client-option.model.ts
index 16c921344..8802edc32 100644
--- a/client/src/types/register-client-option.model.ts
+++ b/client/src/types/register-client-option.model.ts
@@ -21,6 +21,8 @@ export type RegisterClientHelpers = {
21 21
22 isLoggedIn: () => boolean 22 isLoggedIn: () => boolean
23 23
24 getAuthHeader: () => { 'Authorization': string } | undefined
25
24 getSettings: () => Promise<{ [ name: string ]: string }> 26 getSettings: () => Promise<{ [ name: string ]: string }>
25 27
26 getServerConfig: () => Promise<ServerConfig> 28 getServerConfig: () => Promise<ServerConfig>