FakeCtrlAppAuth class
Deterministic in-memory fake for tests. Never touches the network.
- Implemented types
Constructors
- FakeCtrlAppAuth({SessionState? initial})
Properties
-
authStateChanges
→ Stream<
SessionState> -
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → void -
Cancel an in-flight sign-in: clears the pending verifier/state so a
late callback delivery is rejected as
cancelled.override -
dispose(
) → void -
override
-
getAssuranceLevel(
) → Assurance -
override
-
getAuthStatus(
) → Future< Map< String, dynamic> > -
override
-
getSession(
{bool force = false}) → Future< SessionState> -
override
-
handleCallback(
Uri callbackUri) → Future< SessionState> -
Called by your
app_links/ deep-link handler with the incoming URI. Validates scheme/host/path/state, deduplicates, exchanges the handoffcodefor a session artifact, emits Authenticated.override -
hasPermission(
String permission) → bool -
override
-
hasRole(
String role) → bool -
override
-
linkProvider(
String provider, {String? returnTo}) → Future< void> -
override
-
listProviders(
) → Future< List< AuthProvider> > -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
push(
SessionState next) → void -
refreshSession(
) → Future< SessionState> -
override
-
requestStepUp(
{String? acr, String? returnTo}) → Future< void> -
override
-
signIn(
{String? provider, String? returnTo}) → Future< void> -
Launch hosted sign-in with PKCE S256 + state + nonce. In mobile
mode (default when CtrlAppAuthConfig.callbackUrl is not the BFF
origin) generates a code_verifier and sends its S256 challenge to
/api/public/auth/login?mobile=1&.... The system browser then hands control to the OS-registered app link which the caller forwards to handleCallback.override -
signOut(
{String? returnTo}) → Future< void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unlinkProvider(
String provider) → Future< bool> -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited