OAuth tokens scoped to a context are never requested and don't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned | ||
launchpadlib |
Triaged
|
Low
|
Unassigned |
Bug Description
There's a launchpadlib problem here and a Launchpad problem. The launchpadlib problem is that if you pass in a context to Credential.
If you do somehow get an access token that's scoped to some context (like firefox), you can't use the token with launchpadlib, because the service root is out of scope! (At least, I believe this is why.) Here's the error you get:
Traceback (most recent call last):
File "/srv/staging.
result = publication.
File "/srv/staging.
WebServiceP
File "/srv/staging.
return mapply(ob, request.
File "/srv/staging.
return debug_call(obj, args)
File "/srv/staging.
return obj(*args)
File "/srv/staging.
return func(*args, **kwargs)
File "/srv/staging.
principal, objecttoauthorize)
File "/srv/staging.
if container.
AttributeError: 'NoneType' object has no attribute 'isWithin'
Until recently (my second attempt at making it possible to use launchpadlib from Launchpad pagetests) we did not have an end-to-end test of launchpadlib using a credential with a context. (We thought we did, but we didn't, because the launchpadlib side of things didn't work.) Fortunately, nobody uses this feature (or we'd have a lot of complaints), so it's not _too_ bad.
summary: |
- OAuth tokens with scoped permissions are never requested and don't work + OAuth tokens scoped to a context are never requested and don't work |
Changed in launchpad-foundations: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in launchpadlib: | |
status: | New → Triaged |
importance: | Undecided → Low |