-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #766 from christophercr/feature/configurable-sessi…
…on-states feat(stark-core): allow customizing Login and Preloading states via the StarkSessionConfig
- Loading branch information
Showing
17 changed files
with
260 additions
and
179 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 24 additions & 4 deletions
28
packages/stark-core/src/modules/session/entities/session-config.entity.intf.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,16 +1,36 @@ | ||
import {InjectionToken} from "@angular/core"; | ||
import { InjectionToken } from "@angular/core"; | ||
|
||
/** | ||
* The InjectionToken version of the config name | ||
*/ | ||
export const STARK_SESSION_CONFIG: InjectionToken<StarkSessionConfig> = new InjectionToken< | ||
StarkSessionConfig | ||
>("StarkSessionConfig"); | ||
export const STARK_SESSION_CONFIG: InjectionToken<StarkSessionConfig> = new InjectionToken<StarkSessionConfig>("StarkSessionConfig"); | ||
|
||
/** | ||
* Definition of the configuration object for the Stark Session service | ||
*/ | ||
export interface StarkSessionConfig { | ||
/** | ||
* Router state for the Login page where the user can choose a profile and use it to impersonate himself as someone else. | ||
* This state is only used in DEVELOPMENT. | ||
*/ | ||
loginStateName?: string; | ||
|
||
/** | ||
* Router state for the Preloading page where the user profile is fetched and used to automatically log the user in. | ||
* This state is only used in PRODUCTION. | ||
*/ | ||
preloadingStateName?: string; | ||
|
||
/** | ||
* Router state for the Session Expired page to be shown when the user has been automatically logged out. | ||
* Such automatic logout occurs when the timeout of the session expiration timer (triggered due to user inactivity) is reached. | ||
* This state is used in PRODUCTION and DEVELOPMENT. | ||
*/ | ||
sessionExpiredStateName?: string; | ||
|
||
/** | ||
* Router state for the Session Logout Page that will be shown when the user intentionally logs out from the application. | ||
* This state is used in PRODUCTION and DEVELOPMENT. | ||
*/ | ||
sessionLogoutStateName?: string; | ||
} |
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.