add context to interface name

This commit is contained in:
Mads Rasmussen
2023-11-10 22:01:58 +01:00
parent 6827b1ae8c
commit 9c6019b1fe
3 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
import { Observable } from '@umbraco-cms/backoffice/external/rxjs';
export interface IUmbAuth {
export interface IUmbAuthContext {
isAuthorized: Observable<boolean>;
/**

View File

@@ -1,4 +1,4 @@
import { IUmbAuth } from './auth.context.interface.js';
import { IUmbAuthContext } from './auth.context.interface.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_AUTH_CONTEXT = new UmbContextToken<IUmbAuth>('UmbAuthContext');
export const UMB_AUTH_CONTEXT = new UmbContextToken<IUmbAuthContext>('UmbAuthContext');

View File

@@ -1,10 +1,10 @@
import { IUmbAuth } from './auth.context.interface.js';
import { IUmbAuthContext } from './auth.context.interface.js';
import { UmbAuthFlow } from './auth-flow.js';
import { UMB_AUTH_CONTEXT } from './auth.context.token.js';
import { UmbBaseController, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
import { UmbBooleanState } from '@umbraco-cms/backoffice/observable-api';
export class UmbAuthContext extends UmbBaseController implements IUmbAuth {
export class UmbAuthContext extends UmbBaseController implements IUmbAuthContext {
#isAuthorized = new UmbBooleanState<boolean>(false);
readonly isAuthorized = this.#isAuthorized.asObservable();