Skip to main content

Class: LogoutService

Hierarchy

Constructors

constructor

new LogoutService(notificationService, authService)

Parameters

NameType
notificationServiceNotificationService
authServiceAuthService

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
NameType
stateany
actionany
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

DefaultLocalService.[sagas]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:61


[types]

[types]: any

Inherited from

DefaultLocalService.[types]

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

DefaultLocalService.context

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

DefaultLocalService.state

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:66

Methods

[create]

[create](initialState): void

Parameters

NameType
initialStateLogoutState

Returns

void

Inherited from

DefaultLocalService.[create]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:69


[run]

[run](): void

Returns

void

Inherited from

DefaultLocalService.[run]

Defined in

onekijs/packages/onekijs-framework/src/core/Service.ts:208


[stop]

[stop](): void

Returns

void

Inherited from

DefaultLocalService.[stop]

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

NameTypeDescription
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

NameType
errorDefaultBasicError

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

NameType
loadingboolean

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

NameType
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