Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extension POAssignCustomerTokenRequest {
case enableThreeDS2 = "enable_three_d_s_2"
case thirdPartySdkVersion
case metadata
case prefersEphemeralWebAuthenticationSession
case localeIdentifier
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ public struct POAssignCustomerTokenRequest: Codable, Sendable { // sourcery: Aut
@POExcludedEncodable
public private(set) var webAuthenticationCallback: POWebAuthenticationCallback? // sourcery:coding:skip

/// A boolean value that indicates whether the web authentication session should ask the browser
/// for a private authentication session.
///
/// Set `prefersEphemeralWebAuthenticationSession` to true to request that the browser
/// doesn’t share cookies or other browsing data between the authentication session
/// and the user’s normal browser session.
///
/// The value of this property is `true` by default.
@POExcludedEncodable
public private(set) var prefersEphemeralWebAuthenticationSession: Bool
Comment thread
andrii-vysotskyi-cko marked this conversation as resolved.
Resolved

/// Customer's locale identifier override.
public let localeIdentifier: String?

Expand All @@ -67,6 +78,7 @@ public struct POAssignCustomerTokenRequest: Codable, Sendable { // sourcery: Aut
thirdPartySdkVersion: String? = nil,
metadata: [String: String]? = nil,
webAuthenticationCallback: POWebAuthenticationCallback? = nil,
prefersEphemeralWebAuthenticationSession: Bool = true,
localeIdentifier: String? = nil
) {
self.customerId = customerId
Expand All @@ -78,6 +90,7 @@ public struct POAssignCustomerTokenRequest: Codable, Sendable { // sourcery: Aut
self.thirdPartySdkVersion = thirdPartySdkVersion
self.metadata = metadata
self.webAuthenticationCallback = webAuthenticationCallback
self.prefersEphemeralWebAuthenticationSession = prefersEphemeralWebAuthenticationSession
self.localeIdentifier = localeIdentifier
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ final class DefaultCustomerTokensService: POCustomerTokensService {
let customerActionRequest = CustomerActionRequest(
customerAction: customerAction,
webAuthenticationCallback: request.webAuthenticationCallback,
prefersEphemeralWebAuthenticationSession: true
prefersEphemeralWebAuthenticationSession: request.prefersEphemeralWebAuthenticationSession
)
let newSource = try await customerActionsService.handle(
request: customerActionRequest, threeDSService: threeDSService
Expand Down Expand Up @@ -107,7 +107,9 @@ private extension POAssignCustomerTokenRequest { // swiftlint:disable:this no_ex
invoiceId: invoiceId,
thirdPartySdkVersion: newSdkVersion ?? thirdPartySdkVersion,
metadata: metadata,
webAuthenticationCallback: webAuthenticationCallback
webAuthenticationCallback: webAuthenticationCallback,
prefersEphemeralWebAuthenticationSession: prefersEphemeralWebAuthenticationSession,
localeIdentifier: localeIdentifier
)
return updatedRequest
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ private extension POInvoiceAuthorizationRequest { // swiftlint:disable:this no_e
clientSecret: clientSecret,
metadata: metadata,
webAuthenticationCallback: webAuthenticationCallback,
prefersEphemeralWebAuthenticationSession: prefersEphemeralWebAuthenticationSession,
localeIdentifier: localeIdentifier
)
return updatedRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ final class DefaultTelemetryService: TelemetryService, @unchecked Sendable {

private func telemetryMetadata(configuration: TelemetryServiceConfiguration) async -> Telemetry.Metadata {
let application = Telemetry.ApplicationMetadata(
name: configuration.applicationVersion, version: configuration.applicationVersion
name: configuration.applicationName, version: configuration.applicationVersion
)
let device: Telemetry.DeviceMetadata = await {
let metadata = await deviceMetadataProvider.deviceMetadata
Expand Down
Loading