AuthentificationFacade

public protocol AuthentificationFacade

The interface of the class that is responsible for verifying user authorization and changing its parameters.

  • A function that checks if the password for this account

    Declaration

    Swift

    func isOwnedBy(name: String, password: String, completion: @escaping Completion<UserAccount>)

    Parameters

    name

    Account name or id

    password

    Password

    completion

    Callback which returns an account or error

  • A function that checks if accounts registered in chain with public keys from WIF and return them

    Declaration

    Swift

    func isOwnedBy(wif: String, completion: @escaping Completion<[UserAccount]>)

    Parameters

    wif

    WIF of account that needs to check

    completion

    Callback which returns an an array of accounts or error

  • Function for changing the password

    Declaration

    Swift

    func changePassword(old: String, new: String, name: String, completion: @escaping Completion<Bool>)

    Parameters

    old

    Old account password

    new

    New account password

    name

    Account name or id

    completion

    Callback in which the information will return whether the change password was successful