Part of canonical.launchpad.interfaces.oauth View In Hierarchy
Known implementations: canonical.launchpad.database.oauth.OAuthRequestToken
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_reviewed | The date in which the user authorized (or not) the consumer to access his 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. |
Datetime | date_created | Undocumented |
Datetime | date_expires | From this date onwards this token can not be used by the consumer to access protected resources. |
TextLine | key | The key used to identify this token. It is included by the consumer in each request. |
TextLine | secret | The secret associated with this token. It is used by the consumer to sign its requests. |
Choice | product | Undocumented |
Choice | project | Undocumented |
Choice | sourcepackagename | Undocumented |
Choice | distribution | Undocumented |
Attribute | context | FIXME |
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.
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.