syft.grid.authentication.account

Module Contents

class syft.grid.authentication.account.AccountCredential(username, password)

Bases: syft.grid.authentication.credential.AbstractCredential

Parse/represent credentials based on username-password structure. Expected JSON Format: { “accounts”: [ {“user”: “example1”, “password”: “pass_example”},

{“user”: “user2”, “password”: “password2”},

]

}

USERNAME_FIELD = username
PASSWORD_FIELD = password
CREDENTIAL_FIELD = accounts
static parse(path: str, file_name: str)

Static method used to create new account authentication instances parsing a json file. :param path: Json file path. :type path: str :param file_name: File’s name. :type file_name: str

Returns

List of account objects.

Return type

List

json(self)

Convert account instances into a JSON/Dictionary structure.

__str__(self)