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

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

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

A token used by a consumer to access protected resources in LP.

It's created automatically once a user logs in and grants access to a consumer. The consumer then exchanges an IOAuthRequestToken for it.

Choice permission The level of access given to the application acting on your behalf.
Method checkNonceAndTimestamp Verify the nonce and timestamp.

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 level of access given to the application acting on your behalf.
def checkNonceAndTimestamp(nonce, timestamp):
Verify the nonce and timestamp.

  • Ensure the nonce hasn't been used with the same timestamp.
  • Ensure this is a first access, or this timestamp is no older than last timestamp minus TIMESTAMP_ACCEPTANCE_WINDOW.
  • Ensure this timestamp is within +/- TIMESTAMP_SKEW_WINDOW of the server's concept of now.

If the nonce has never been used together with this token and timestamp before, we store it in the database with the given timestamp and associated with this token.

RaisesNonceAlreadyUsedIf the nonce has been used before with the same timestamp.
TimestampOrderingErrorIf the timestamp is older than the last timestamp minus TIMESTAMP_ACCEPTANCE_WINDOW.
ClockSkewIf the timestamp is not within +/- TIMESTAMP_SKEW_WINDOW of now.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.