add manifest model for external auth provider
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
import type { ManifestElement } from '@umbraco-cms/backoffice/extension-api';
|
||||
import type { UUIInterfaceColor, UUIInterfaceLook } from '@umbraco-cms/backoffice/external/uui';
|
||||
|
||||
/**
|
||||
* Represents an authentication provider that can be used to authenticate users.
|
||||
* The provider needs to be registered in the API that the authorization request is sent to in order to be used.
|
||||
*
|
||||
* @see {forProviderName} for the provider name that this provider is for.
|
||||
*/
|
||||
export interface ManifestAuthProvider extends ManifestElement {
|
||||
type: 'authProvider';
|
||||
|
||||
/**
|
||||
* The provider name that this provider is for.
|
||||
* @examples 'Umbraco.Github'
|
||||
*/
|
||||
forProviderName: string;
|
||||
|
||||
meta?: MetaAuthProvider;
|
||||
}
|
||||
|
||||
export interface MetaAuthProvider {
|
||||
/**
|
||||
* The label of the provider that is shown to the user.
|
||||
*/
|
||||
label?: string;
|
||||
|
||||
/**
|
||||
* The default view of the provider that is shown to the user.
|
||||
* If no element is provided, then the button will be rendered as a @see {UUIButtonElement} using these options.
|
||||
*/
|
||||
defaultView: {
|
||||
/**
|
||||
* The icon of the provider that is shown to the user.
|
||||
* @examples ['icon-cloud', 'icon-github', 'icon-google', 'icon-facebook', 'icon-twitter', 'icon-x', 'icon-microsoft']
|
||||
* @default 'icon-cloud'
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
/**
|
||||
* The color of the provider that is shown to the user.
|
||||
* @default 'secondary'
|
||||
*/
|
||||
color?: UUIInterfaceLook;
|
||||
|
||||
/**
|
||||
* The look of the provider that is shown to the user.
|
||||
* @default 'default'
|
||||
*/
|
||||
look?: UUIInterfaceColor;
|
||||
};
|
||||
|
||||
/**
|
||||
* If true, the Umbraco backoffice login will be disabled.
|
||||
* @default false
|
||||
*/
|
||||
denyLocalLogin?: boolean;
|
||||
|
||||
/**
|
||||
* If true, the user will be redirected to the provider's login page immediately.
|
||||
* @default false
|
||||
*/
|
||||
autoRedirect?: boolean;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { ManifestAuthProvider } from './auth-provider.model.js';
|
||||
import type { ManifestBlockEditorCustomView } from './block-editor-custom-view.model.js';
|
||||
import type { ManifestCollection } from './collection.models.js';
|
||||
import type { ManifestCollectionView } from './collection-view.model.js';
|
||||
@@ -64,6 +65,7 @@ import type {
|
||||
ManifestEntryPoint,
|
||||
} from '@umbraco-cms/backoffice/extension-api';
|
||||
|
||||
export type * from './auth-provider.model.js';
|
||||
export type * from './block-editor-custom-view.model.js';
|
||||
export type * from './collection.models.js';
|
||||
export type * from './collection-action.model.js';
|
||||
@@ -131,12 +133,13 @@ export type ManifestWorkspaces = ManifestWorkspace | ManifestWorkspaceRoutableKi
|
||||
export type ManifestWorkspaceViews = ManifestWorkspaceView | ManifestWorkspaceViewContentTypeDesignEditorKind;
|
||||
|
||||
export type ManifestTypes =
|
||||
| ManifestAuthProvider
|
||||
| ManifestBundle<ManifestTypes>
|
||||
| ManifestCondition
|
||||
| ManifestBlockEditorCustomView
|
||||
| ManifestCollection
|
||||
| ManifestCollectionView
|
||||
| ManifestCollectionAction
|
||||
| ManifestCondition
|
||||
| ManifestDashboard
|
||||
| ManifestDashboardCollection
|
||||
| ManifestDynamicRootOrigin
|
||||
|
||||
Reference in New Issue
Block a user