c.l.i.o.IOAuthRequestToken(IOAuthToken) : interface documentation

Part of canonical.launchpad.interfaces.oauth View In Hierarchy

Known implementations: canonical.launchpad.database.oauth.OAuthRequestToken

A token used by a consumer to ask the user to authenticate on LP.

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 =
The permission you give to the application which may act on your behalf.
date_reviewed =
The date in which the user authorized (or not) the consumer to access his protected resources on Launchpad.
is_reviewed =
A reviewed request token can only be exchanged for an access token (in case the user granted access).
def review(user, permission, context=None):
Grant 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.

ParameterscontextAn IProduct, IProjectGroup, IDistribution or IDistributionSourcePackage in which the permission is valid. If None, the permission will be valid everywhere.
def createAccessToken():
Create an 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.

API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.