def METHOD_NAME(username):
    """
    Delete all credentials stored to the keyring.
    """
    for credential_cls in (SynapseApiKeyCredentials, SynapseAuthTokenCredentials):
        creds = credential_cls.get_from_keyring(username)
        if creds:
            creds.delete_from_keyring()