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

Add tests for get_user_access_token method #307

Open
Ram81 opened this issue Jan 23, 2021 · 5 comments · May be fixed by #314
Open

Add tests for get_user_access_token method #307

Ram81 opened this issue Jan 23, 2021 · 5 comments · May be fixed by #314

Comments

@Ram81
Copy link
Member

Ram81 commented Jan 23, 2021

Description

Add tests for get_user_access_token method in evalai/utils/auth.py.

@ShauryaAg
Copy link

@Ram81 I would like to work on this issue. But I am a little unfamiliar with the working of this method.
From what I see, this method takes the auth token as input and returns the same token again as output?

Can you help me with this?

@Ram81
Copy link
Member Author

Ram81 commented Jan 24, 2021

@ShauryaAg the method accepts a expiring auth token as a parameter and makes API call to evalai backend to get an Access Token. Expiring auth tokens expire when user logs out but the access token can be used to make api calls irrespective of login state

@ShauryaAg
Copy link

@Ram81 sorry about the confusion, my local clone was not up-to-date.

I would like to take this issue.

@Ram81
Copy link
Member Author

Ram81 commented Jan 24, 2021

@ShauryaAg Sure, go ahead.

@ShauryaAg
Copy link

ShauryaAg commented Jan 24, 2021

@Ram81 The test for get_user_access_token are already written in test_get_token.py. As get_token reads from the same file (~/.evalai/token.json) as set during login (which calls utils.auth.get_user_auth_token_by_login and utils.auth.get_user_access_token).

@ShauryaAg ShauryaAg linked a pull request Jan 26, 2021 that will close this issue
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 a pull request may close this issue.

2 participants