SASKeychainDelegate
@objc
public protocol SASKeychainDelegate
Keychain IO definition for the SASManager
This interface defines the keychain functionality for the SASManager. User
Applications can override this delegate via SASManagerDelegate.getKeychainDelegate()
.
Since
since 8.22-
Retrieves a password for a service and an account.
Since
since 8.22Declaration
Swift
func password(forService name: String, account: String) -> String?
Parameters
name
The service name for this password.
account
The account name for this password.
Return Value
The password if found, or nil.
-
Sets a password for a service and account.
Since
since 8.22Declaration
Swift
func setPassword(_ password: String, forService: String, account: String) -> Bool
Parameters
password
The password to be set.
forService
The service name for this password.
account
The account name for this password.
Return Value
Indicates if the storage was successful.
-
Deletes a password entry.
Since
since 8.22Declaration
Swift
func deletePassword(forService: String, account: String) -> Bool
Parameters
forService
The service for the password deletion.
account
The account for the password deletion.
Return Value
true
if the deletion was sucessful. -
All known accounts for a service.
Since
since 8.22Declaration
Swift
func accounts(forService: String) -> [Any]
Parameters
forService
The service name.
Return Value
A list of known accounts for the service.