Class: AuthService
Hierarchy
↳
AuthService
Constructors
constructor
• new AuthService()
Inherited from
DefaultGlobalService.constructor
Properties
[combinedReducers]
• [combinedReducers]: (state: any, action: any) => any
Type declaration
▸ (state, action): any
Parameters
| Name | Type |
|---|---|
state | any |
action | any |
Returns
any
Inherited from
DefaultGlobalService.[combinedReducers]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:63
[dispatch]
• [dispatch]: any
Inherited from
DefaultGlobalService.[dispatch]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:62
[inReducer]
• [inReducer]: boolean
Inherited from
DefaultGlobalService.[inReducer]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:64
[reducers]
• [reducers]: any
Inherited from
DefaultGlobalService.[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
context
• context: AppContext
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/app/AppService.ts:8
state
• state: AnyState
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:66
Methods
[create]
▸ [create](initialState): void
Parameters
| Name | Type |
|---|---|
initialState | AnyState |
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/app/GlobalService.ts:7
[stop]
▸ [stop](): void
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/app/GlobalService.ts:15
clear
▸ clear(onError?, onSuccess?): Generator<void, void, unknown>
Clear all authentication data from the redux store and the persistence storage
Parameters
| Name | Type |
|---|---|
onError? | ErrorCallback<BasicError> |
onSuccess? | SuccessCallback<any> |
Returns
Generator<void, void, unknown>
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:155
fetchSecurityContext
▸ fetchSecurityContext(onError?, onSuccess?): Generator<string | void | Promise<any> | Generator<void | AnonymousObject<any>, undefined | null | string | AnonymousObject<any>, string & string & AnonymousObject<any>>, undefined | null | AnonymousObject<any>, null | AnonymousObject<any>>
Get the security context from the server and save it
Parameters
| Name | Type |
|---|---|
onError? | ErrorCallback<BasicError> |
onSuccess? | SuccessCallback<any> |
Returns
Generator<string | void | Promise<any> | Generator<void | AnonymousObject<any>, undefined | null | string | AnonymousObject<any>, string & string & AnonymousObject<any>>, undefined | null | AnonymousObject<any>, null | AnonymousObject<any>>
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:185
loadToken
▸ loadToken(onError?, onSuccess?): Generator<void | AnonymousObject<any>, undefined | null | string | AnonymousObject<any>, string & string & AnonymousObject<any>>
Load the token from the persistence storage to the redux store
Parameters
| Name | Type |
|---|---|
onError? | ErrorCallback<BasicError> |
onSuccess? | SuccessCallback<any> |
Returns
Generator<void | AnonymousObject<any>, undefined | null | string | AnonymousObject<any>, string & string & AnonymousObject<any>>
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:268
refreshToken
▸ refreshToken(token, idp, force?, onError?): undefined | AnonymousObject<any>
Refresh the token against an IDP
Parameters
| Name | Type | Default value |
|---|---|---|
token | AnonymousObject<any> | undefined |
idp | Idp | undefined |
force | boolean | false |
onError? | ErrorCallback<BasicError> | undefined |
Returns
undefined | AnonymousObject<any>
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:349
saveToken
▸ saveToken(token, idp, onError?): Generator<void | Promise<boolean> | ForkEffect<undefined | AnonymousObject<any>>, null | string | AnonymousObject<any>, boolean>
Validate the token and save it in the store and persistence storage and trigger the refreshing of the token if applicable
Parameters
| Name | Type |
|---|---|
token | string | AnonymousObject<any> |
idp | Idp |
onError? | ErrorCallback<BasicError> |
Returns
Generator<void | Promise<boolean> | ForkEffect<undefined | AnonymousObject<any>>, null | string | AnonymousObject<any>, boolean>
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:455
setIdp
▸ setIdp(idp?): void
Save the idp name in the redux store
Parameters
| Name | Type | Description |
|---|---|---|
idp? | Idp | : the IDP to save (full object). Can be null for removal |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:104
setSecurityContext
▸ setSecurityContext(securityContext?): void
Save the security context in the redux store
Parameters
| Name | Type | Description |
|---|---|---|
securityContext? | null | AnonymousObject<any> | : the security context to save |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:25
setToken
▸ setToken(token): void
Save the token in the redux store
Parameters
| Name | Type | Description |
|---|---|---|
token | null | string | AnonymousObject<any> | : the token to save |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/auth/AuthService.ts:35