Skip to content

Commit

Permalink
Add revision: v1.26.4
Browse files Browse the repository at this point in the history
  • Loading branch information
GovernikusAusweisApp2 committed Apr 28, 2023
1 parent 5610b88 commit d69f0a9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion card/core/AusweisApp2/AA2SdkConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class AA2SdkConnection: SdkConnection {
do {
let messageData = try jsonEncoder.encode(command)
if let messageJson = String(data: messageData, encoding: .utf8) {
print("Send message: \(messageJson)")
ausweisapp2_send(messageJson)
}
} catch {
Expand Down
2 changes: 2 additions & 0 deletions card/core/AusweisApp2/protocol/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct AA2Message: Decodable {
let description: AA2Description?
let url: String?
let success: Bool?
let reason: String?
let reader: AA2Reader?
let readers: [AA2Reader]?
let name: String?
Expand All @@ -56,6 +57,7 @@ struct AA2Message: Decodable {
case msg, error, card, result, chat, aux, transactionInfo, validity
case description, url, success, reader, workflow, progress, state
case name, insertable, attached, keypad, readers, available, current
case reason
}
}

Expand Down
2 changes: 1 addition & 1 deletion card/core/WorkflowCallbacks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public protocol WorkflowCallbacks: AnyObject {

- Parameter changePinResult: Result of the pin change
*/
func onChangePinCompleted(changePinResult: ChangePinResult?)
func onChangePinCompleted(changePinResult: ChangePinResult)

/**
A pin change has been started via WorkflowController.startChangePin().
Expand Down
2 changes: 1 addition & 1 deletion card/core/WorkflowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ public class WorkflowController {

case AA2Messages.MsgChangePin:
if let success = message.success {
let result = ChangePinResult(success: success)
let result = ChangePinResult(success: success, reason: message.reason)
callback { $0.onChangePinCompleted(changePinResult: result) }
} else {
callback { $0.onChangePinStarted() }
Expand Down
3 changes: 3 additions & 0 deletions card/core/WorkflowData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ public struct AuthResult {
public struct ChangePinResult {
// False if an error occured or the PIN change was aborted.
public let success: Bool

/// Unique error code if the PIN change failed.
public let reason: String?
}

/// Information about an authentication.
Expand Down

0 comments on commit d69f0a9

Please sign in to comment.