PasscodePolicyAuthenticationStyle
public struct PasscodePolicyAuthenticationStyle : AuthenticationStyle
A custom authentication style that validates a passcode against a FioriPasscodePolicy.
It renders a secure passcode field followed by a live requirement checklist: each requirement
defined by the policy is shown with a checkmark that updates as the user types. Use the policy’s
validate(passcode:) to drive the sign-in button’s disabled state, for example:
Authentication(
title: { Text("Create Passcode") },
isDisabled: !policy.validate(passcode: passcode)
) { /* accepted */ }
.authenticationStyle(PasscodePolicyAuthenticationStyle(passcode: $passcode, policy: policy))
-
Initializes the passcode policy authentication style.
Declaration
Swift
public init(passcode: Binding<String>, policy: FioriPasscodePolicy)Parameters
passcodeBinding for the passcode field.
policyThe passcode policy that defines the requirements.
-
Undocumented
Declaration
Swift
public func makeBody(_ configuration: AuthenticationConfiguration) -> some View