Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(authentication): switch authentication mode #95

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

MatthiasMichel
Copy link
Contributor

Description:

  • function fails with {'message': 'Not authenticated'}
  • move to different headers and authentication solves the problem

Steps to reproduce:

  • Demo code, modify uid_to_update, username and password
import asyncio

from config import password, username
from spond import spond

async def main():
    s = spond.Spond(username=username, password=password)
    uid_to_update = "xxxxxxxxxxx"
    updates = {
        'heading': "print",
        'description': "New Description with changes",
        # Add other updates as needed
    }

    try:
        await s.update_event(uid_to_update, updates)
        print("Event updated successfully.")
    except Exception as e:
        print(f"Failed to update event: {e}")

    await s.clientsession.close()

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
asyncio.run(main())

Expected behavier:

  • authentication is successful

Description:
- function fails with  `{'message': 'Not authenticated'}`
- move to different headers and authentication solves the problem

Steps to reproduce:
- Demo code, modify uid_to_update, username and password

````
import asyncio

from config import password, username
from spond import spond

async def main():
    s = spond.Spond(username=username, password=password)
    uid_to_update = "xxxxxxxxxxx"
    updates = {
        'heading': "print",
        'description': "New Description with changes",
        # Add other updates as needed
    }

    try:
        await s.update_event(uid_to_update, updates)
        print("Event updated successfully.")
    except Exception as e:
        print(f"Failed to update event: {e}")

    await s.clientsession.close()

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
asyncio.run(main())

````

Expected behavier:
- authentication is successful
@Olen
Copy link
Owner

Olen commented Nov 13, 2023

LGTM

@Olen Olen merged commit d117021 into Olen:main Nov 13, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants