Carlos Cruz wants to merge 1 commit from /u/ccruz/allura/ to master, 2024-05-13
oauthlib
's credentials object to the database. It now removes a big nested request
object which is not needed, and passes it around to the authorization form in a hidden input.Commit | Date | |
---|---|---|
2024-05-08 17:04:30 | Tree |
ast.literal_eval
what aboutjson.loads
? I think that'd be a bit more typical and safer (literal_eval is more safe than regular eval, but I just checked the docs and it does have some warnings about ways it might not be safe)curl 'https://my-dev-site/rest/' -H 'Authorization: Bearer REDACTED'
but it didn't work, I got a 401. Maybe because the token'sexpires_at
is set to1970-01-01T01:00:00
?I also got this error when re-authorizing an app a 2nd time
And it was kind of confusing because from the request side, I just got a response that was
204 No Content
with no message at all. I think we should remove all thein rest.py. If there's some unexpected error its good to let the page completely error out so the client gets a 500 error and we get fatal errors in the normal places
Fixes:
owner
andowner_id
back touser
anduser_id
in order to be consistent with the user objects set in the authentication pipeline.ast.literal_eval
and replaced it in favor ofjson.dumps
to serialize thecredentials
object andjson.loads
to reconstruct ittry
/except
clauses from the authorization and token endpointsOAuth2AccessToken has no attribute remove
error was fixed by executingOAuth2AccessToken.query.remove
instead ofOAuth2AccessToken.remove