Line

ui/client/features/auth/workflows/AuthSession

Cockpit client (features), v0.9. Source: ui/client/features/auth/workflows/AuthSession.ts.

Type Aliases#

AuthSessionAction#

AuthSessionAction = { type: "LOAD_START"; } | { session: AuthSession; type: "LOADED"; } | { message: string; type: "LOAD_FAILED"; } | { type: "SIGN_IN_START"; } | { message: string; type: "SIGN_IN_FAILED"; }

Defined in: ui/client/features/auth/workflows/AuthSession.ts:20


AuthSessionState#

AuthSessionState = object

Defined in: ui/client/features/auth/workflows/AuthSession.ts:6

Properties#

error

error: string | null

Defined in: ui/client/features/auth/workflows/AuthSession.ts:17

loading

loading: boolean

Defined in: ui/client/features/auth/workflows/AuthSession.ts:11

True until the first /auth/session answer lands. Distinguishing "still asking" from "asked, and you are logged out" is what keeps the login screen from flashing over an already-authenticated Cockpit.

session

session: AuthSession | null

Defined in: ui/client/features/auth/workflows/AuthSession.ts:7

signingIn

signingIn: boolean

Defined in: ui/client/features/auth/workflows/AuthSession.ts:16

In-flight state for the login screen's own button.

unreachable

unreachable: string | null

Defined in: ui/client/features/auth/workflows/AuthSession.ts:14

Set when /auth/session itself could not be reached — a different problem from being logged out, and shown differently.

Variables#

initialAuthSessionState#

const initialAuthSessionState: AuthSessionState

Defined in: ui/client/features/auth/workflows/AuthSession.ts:27

Functions#

authSessionReducer()#

authSessionReducer(state, action): AuthSessionState

Defined in: ui/client/features/auth/workflows/AuthSession.ts:35

Parameters#

state

AuthSessionState

action

AuthSessionAction

Returns#

AuthSessionState