@read_session
def list_accounts_for_identity(identity, type, session=None):
    '\n    Returns a list of all accounts for an identity.\n\n    :param identity: The identity key name. For example x509 DN, or a username.\n    :param type: The type of the authentication (x509, gss, userpass, saml).\n    :param session: The database session in use.\n\n    returns: A list of all accounts for the identity.\n    '
    account_list = []
    for (account,) in session.query(models.IdentityAccountAssociation.account).filter_by(identity=identity, identity_type=type):
        account_list.append(account)
    return account_list
Returns a list of all accounts for an identity.

:param identity: The identity key name. For example x509 DN, or a username.
:param type: The type of the authentication (x509, gss, userpass, saml).
:param session: The database session in use.

returns: A list of all accounts for the identity.
@read_session
def list_accounts_for_identity(identity, type, session=None):
    '\n    Returns a list of all accounts for an identity.\n\n    :param identity: The identity key name. For example x509 DN, or a username.\n    :param type: The type of the authentication (x509, gss, userpass, saml).\n    :param session: The database session in use.\n\n    returns: A list of all accounts for the identity.\n    '
    account_list = []
    for (account,) in session.query(models.IdentityAccountAssociation.account).filter_by(identity=identity, identity_type=type):
        account_list.append(account)
    return account_list