Part of lp.services.oauth.interfaces View In Hierarchy
After the user has authenticated and granted access to that consumer, the request token is exchanged for an access token and is then destroyed.
Choice | permission | The permission you give to the application which may act on your behalf. |
Datetime | date_created | The date the token was created. The request token will be good for a limited time after this date. |
Datetime | date_expires | The expiration date for the permission you give to the application which may act on your behalf. |
Datetime | date_reviewed | The date in which the user authorized (or not) the consumer to access their protected resources on Launchpad. |
Bool | is_reviewed | A reviewed request token can only be exchanged for an access token (in case the user granted access). |
Method | review | Grant permission as user to this token's consumer. |
Method | createAccessToken | Create an IOAuthAccessToken identical to this request token. |
Inherited from IOAuthToken:
Object | consumer | The consumer which will access Launchpad on the user's behalf. |
Object | person | The user on whose behalf the consumer is accessing. |
TextLine | key | The key used to identify this token. It is included by the consumer in each request. |
Choice | product | Undocumented |
Choice | projectgroup | Undocumented |
Choice | sourcepackagename | Undocumented |
Choice | distribution | Undocumented |
Attribute | context | FIXME |
Bool | is_expired | A token may only be usable for a limited time, after which it will expire. |
Method | isSecretValid | Check if a secret is valid for this token. |
permission
as user
to this token's consumer.
Set this token's person, permission and date_reviewed. This will also cause this token to be marked as used, meaning it can only be exchanged for an access token with the same permission, consumer and person.
Parameters | context | An IProduct, IProjectGroup, IDistribution or IDistributionSourcePackage in which the permission is valid. If None, the permission will be valid everywhere. |
IOAuthAccessToken
identical to this request token.
The new token and its secret are returned.
After the access token is created, this one is deleted as it can't be used anymore.
You must not attempt to create an access token if the request token hasn't been reviewed or if its permission is UNAUTHORIZED.