-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* install app auth * add service to handle auth * add openid handling to general app * move props to constructor * update default api url to https * add support for adjusting umbracoUrl from outside * use origin url for redirect if empty from env * merge origin/main * merge origin/main * add redirect uri support * only check auth on firstUpdated * merge origin/main * fix redirect_uri * listen for auth-success events before anything else * save current route to restore after login * set token function for all OpenAPI requests * include credentials after login * update openapi-typescript-codegen * generate new models with bugfixes for CancelablePromise and request * remove auth-success event * wait with fetchServiceConfiguration until we actually need to query the server * revert change where service configuration was delayed * use LocalStorageBackend to save/restore token state * improve documentation * cleanup todos * improve docs * update documentation and set everything to private fields * remove undefined * add a token to provide server url * add more docs * provide the base url of the server through a token * add more docs * fix import * allow to override the backoffice base url through a property * use private modifier * duplicate login image * make generic error element to use as error page * check for initialisation errors and show error page if necessary * rename class to UmbAuthFlow * control the notification manually with runtime status call * add styling * add stack to problemdetails * forward all errors * support problemdetails rendering * allow passthrough without a token * move error logic to function * add support for BOOT_FAILED and default errors * rename background img * remove false character * check for isMocking to simplify auth flow * add support for generic ApiErrors * make sure all errors from api controllers are ApiError or CancelError to be able to fine-tune the handling of them * remove unused legacy method * show notifications (for now) after session expiration * break early on CancelErrors * revert options argument * remove login token after a 401 is detected * catch api errors * prefix class with Umb * throw errors instead of using ProblemDetailsModel * add TODO * add TODO --------- Co-authored-by: Mads Rasmussen <[email protected]>
- Loading branch information
1 parent
16eddfa
commit 426eb58
Showing
49 changed files
with
2,615 additions
and
18,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Copy this to .env.local and change what you want to test. | ||
VITE_UMBRACO_USE_MSW=on # on = turns on MSW, off = disables all mock handlers | ||
VITE_UMBRACO_API_URL=http://localhost:11000 | ||
VITE_UMBRACO_API_URL=https://localhost:44339 | ||
VITE_UMBRACO_INSTALL_STATUS=running # running or must-install or must-upgrade | ||
VITE_MSW_QUIET=off # on = turns off MSW console logs, off = turns on MSW console logs | ||
VITE_UMBRACO_EXTENSION_MOCKS=off # on = turns on extension mocks, off = turns off extension mocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
libs/repository/data-source/data-source-response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import type { ProblemDetailsModel } from '@umbraco-cms/backoffice/backend-api'; | ||
import type { ApiError, CancelError } from '@umbraco-cms/backoffice/backend-api'; | ||
|
||
export interface DataSourceResponse<T = undefined> extends UmbDataSourceErrorResponse { | ||
data?: T; | ||
} | ||
|
||
export interface UmbDataSourceErrorResponse { | ||
error?: ProblemDetailsModel; | ||
error?: ApiError | CancelError; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './resource.controller'; | ||
export * from './serverUrl.token'; | ||
export * from './tryExecute.function'; | ||
export * from './tryExecuteAndNotify.function'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; | ||
|
||
/** | ||
* The base URL of the configured Umbraco server. | ||
* If the server is local, this will be an empty string. | ||
* | ||
* @remarks This is the base URL of the Umbraco server, not the base URL of the backoffice. | ||
* | ||
* @example https://localhost:44300 | ||
* @example https://my-umbraco-site.com | ||
* @example '' | ||
*/ | ||
export const UMB_SERVER_URL = new UmbContextToken<string>( | ||
'UmbServerUrl', | ||
'The base URL of the configured Umbraco server.' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.