ISecureStorage

protocol ISecureStorage

Protocol specifies methods which should be implemented by object which manages auth state storing.

  • Performs auth state storing.

    Declaration

    Swift

    func setAuthInfo(authInfo: AnyObject, completion: @escaping (Result<Bool, Error>) -> Void)

    Parameters

    authInfo

    The auth state to be stored.

    completion

    The callback to invoke upon storing completion.

  • Returns stored auth state.

    Declaration

    Swift

    func getAuthInfo() -> AnyObject?

    Return Value

    Valid auth state object if the stored object is or nil if no one object is stored.

  • Removes stored auth state.

    Declaration

    Swift

    func removeAuthInfo(completion: @escaping (Result<Bool, Error>) -> Void)

    Parameters

    completion

    The callback to invoke upon removal completion.