AuthenticationEvent
@frozen
public enum AuthenticationEvent : Equatable, CustomStringConvertible, CustomDebugStringConvertible
A value representing an event of the AuthenticationService
.
-
Indicates that the authentication state changed.
The associated value is the new authentication state.
Declaration
Swift
case change(state: AuthenticationState)
-
Indicates that an authentication process failed.
The associated value indicates the reason of the failure.
Declaration
Swift
case failure(reason: WebcomError)
-
The new authentication state.
This property is non-
nil
if and only if this value matches theAuthenticationEvent.change(state:)
case.Declaration
Swift
public var state: AuthenticationState? { get }
-
The details of the user currently authenticated.
This property is non-
nil
if and only if this value matches theAuthenticationEvent.change(state:)
case and there is a valid authentication token.Declaration
Swift
public var details: AuthenticationDetails? { get }
-
The failure reason.
This property is non-
nil
if and only if this event corresponds to the failure of an authentication process, i.e. when this value matches theAuthenticationEvent.failure(reason:)
case.Declaration
Swift
public var error: WebcomError? { get }
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var debugDescription: String { get }