mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Authentication rework, cache session, save and login with adsid and xcodeToken to alleviate GSA connection issue in some regions. Fix a timezone issue when extracting anisette data
This commit is contained in:
@@ -53,6 +53,12 @@ public class Keychain
|
||||
@KeychainItem(key: "appleIDPassword")
|
||||
public var appleIDPassword: String?
|
||||
|
||||
@KeychainItem(key: "appleIDAdsid")
|
||||
public var appleIDAdsid: String?
|
||||
|
||||
@KeychainItem(key: "appleIDXcodeToken")
|
||||
public var appleIDXcodeToken: String?
|
||||
|
||||
@KeychainItem(key: "signingCertificatePrivateKey")
|
||||
public var signingCertificatePrivateKey: Data?
|
||||
|
||||
@@ -83,6 +89,12 @@ public class Keychain
|
||||
@KeychainItem(key: "adiPb")
|
||||
public var adiPb: String?
|
||||
|
||||
// for some reason authenticated cert/session/team is completely not cached, which result in logging in for every request
|
||||
// we save it here so when user logs out we can clear cached account/session/team
|
||||
public var certificate: ALTCertificate? = nil
|
||||
public var session: ALTAppleAPISession? = nil
|
||||
public var team: ALTTeam? = nil
|
||||
|
||||
private init()
|
||||
{
|
||||
}
|
||||
@@ -91,7 +103,13 @@ public class Keychain
|
||||
{
|
||||
self.appleIDEmailAddress = nil
|
||||
self.appleIDPassword = nil
|
||||
self.appleIDAdsid = nil
|
||||
self.appleIDXcodeToken = nil
|
||||
self.signingCertificatePrivateKey = nil
|
||||
self.signingCertificateSerialNumber = nil
|
||||
|
||||
self.certificate = nil
|
||||
self.session = nil
|
||||
self.team = nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user