CredentialStorage

public protocol CredentialStorage

Protocol to save API tokens

Can for example be implemented using Keychain on Apple devices

  • Save a value to the store

    Declaration

    Swift

    func save(_ value: String, for key: String)

    Parameters

    value

    value

    key

    key to retrieve in later

  • Retrieve a value

    Declaration

    Swift

    func read(_ key: String) -> String?

    Parameters

    key

    key under which the value was stored

    Return Value

    The saved value or nil if no value was found