Class: LogoutService
Hierarchy
DefaultLocalService
<LogoutState
>↳
LogoutService
Constructors
constructor
• new LogoutService(notificationService
, authService
)
Parameters
Name | Type |
---|---|
notificationService | NotificationService |
authService | AuthService |
Overrides
DefaultLocalService.constructor
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:21
Properties
[combinedReducers]
• [combinedReducers]: (state
: any
, action
: any
) => any
Type declaration
▸ (state
, action
): any
Parameters
Name | Type |
---|---|
state | any |
action | any |
Returns
any
Inherited from
DefaultLocalService.[combinedReducers]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:63
[dispatch]
• [dispatch]: any
Inherited from
DefaultLocalService.[dispatch]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:62
[inReducer]
• [inReducer]: boolean
Inherited from
DefaultLocalService.[inReducer]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:64
[reducers]
• [reducers]: any
Inherited from
DefaultLocalService.[reducers]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:59
[sagas]
• [sagas]: any
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:61
[types]
• [types]: any
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:60
authService
• authService: AuthService
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:19
context
• context: BasicAppContext
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/app/LocalService.ts:9
notificationService
• notificationService: NotificationService
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:18
state
• state: LogoutState
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:66
Methods
[create]
▸ [create](initialState
): void
Parameters
Name | Type |
---|---|
initialState | LogoutState |
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:69
[run]
▸ [run](): void
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:208
[stop]
▸ [stop](): void
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:226
logout
▸ logout(onError?
, onSuccess?
): Generator
<string
| void
| Promise
<any
> | Generator
<void
| CallEffect
<void
> | Generator
<void
, void
, unknown
>, void
, unknown
>, void
, string
>
Logout the user or redirect to an external logout page
Parameters
Name | Type | Description |
---|---|---|
onError? | ErrorCallback <BasicError > | callback for catching possible errors |
onSuccess? | SuccessCallback <any > | callback called after a success logout |
Returns
Generator
<string
| void
| Promise
<any
> | Generator
<void
| CallEffect
<void
> | Generator
<void
, void
, unknown
>, void
, unknown
>, void
, string
>
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:66
onError
▸ onError(error
): void
Inform the user if there is an error
Parameters
Name | Type |
---|---|
error | DefaultBasicError |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:43
onSuccess
▸ onSuccess(): void
Reset the loading and error message after a successful operation
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:53
setLoading
▸ setLoading(loading
): void
Inform the user if there is a loading task
Parameters
Name | Type |
---|---|
loading | boolean |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:33
successLogout
▸ successLogout(onError?
, onSuccess?
): Generator
<void
| CallEffect
<void
> | Generator
<void
, void
, unknown
>, void
, unknown
>
Parameters
Name | Type |
---|---|
onError? | ErrorCallback <BasicError > |
onSuccess? | SuccessCallback <any > |
Returns
Generator
<void
| CallEffect
<void
> | Generator
<void
, void
, unknown
>, void
, unknown
>
Defined in
onekijs/packages/onekijs-framework/src/auth/LogoutService.ts:137