mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 13:05:21 +00:00
COVIDSafe code from version 2.4
This commit is contained in:
parent
377bc0009b
commit
86a09a138c
40 changed files with 1125 additions and 657 deletions
|
@ -19,6 +19,9 @@ final class InfoViewController: UIViewController {
|
|||
@IBOutlet weak var messagesAPILastVersionLabel: UILabel!
|
||||
@IBOutlet weak var bleSensorStateLabel: UILabel!
|
||||
@IBOutlet weak var awakeSensorStateLabel: UILabel!
|
||||
@IBOutlet weak var jwtExpiryLabel: UILabel!
|
||||
@IBOutlet weak var jwtSubjectLabel: UILabel!
|
||||
@IBOutlet weak var refreshExpiryLabel: UILabel!
|
||||
|
||||
@IBOutlet weak var versionNumLabel: UILabel!
|
||||
|
||||
|
@ -49,6 +52,33 @@ final class InfoViewController: UIViewController {
|
|||
clearLogsButton.addTarget(self, action:#selector(self.clearLogsButtonClicked), for: .touchUpInside)
|
||||
silentNotificationsCountLabel.text = "\(UserDefaults.standard.integer(forKey: "debugSilentNotificationCount"))"
|
||||
apnTokenLabel.text = UserDefaults.standard.string(forKey: "deviceTokenForAPN")
|
||||
|
||||
let keychain = KeychainSwift()
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.dateStyle = .short
|
||||
dateFormatter.timeStyle = .medium
|
||||
|
||||
if let token = keychain.get("JWT_TOKEN"),
|
||||
let jwtExpiry = AuthenticationToken(token: token).getExpiry(),
|
||||
let jwtSubject = AuthenticationToken(token: token).getSubject()
|
||||
{
|
||||
jwtExpiryLabel.text = dateFormatter.string(from: jwtExpiry)
|
||||
jwtSubjectLabel.text = jwtSubject
|
||||
} else {
|
||||
jwtExpiryLabel.text = "N/A"
|
||||
}
|
||||
|
||||
if let refreshToken = keychain.get("REFRESH_TOKEN") {
|
||||
if let refreshExpiry = AuthenticationToken(token: refreshToken).getExpiry() {
|
||||
refreshExpiryLabel.text = dateFormatter.string(from: refreshExpiry)
|
||||
} else {
|
||||
refreshExpiryLabel.text = "exists, exp N/A"
|
||||
}
|
||||
|
||||
} else {
|
||||
refreshExpiryLabel.text = "N/A, N/A"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@IBAction func logoutBtn(_ sender: UIButton) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue