EDataServer.SoupAuthBearer

g EDataServer.SoupAuthBearer EDataServer.SoupAuthBearer GObject.Object GObject.Object Soup.Auth Soup.Auth GObject.Object->Soup.Auth Soup.Auth->EDataServer.SoupAuthBearer

Subclasses:

None

Methods

Inherited:

Soup.Auth (15), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

is_expired ()

set_access_token (access_token, expires_in_seconds)

Virtual Methods

Inherited:

Soup.Auth (7), GObject.Object (7)

Properties

Inherited:

Soup.Auth (6)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Soup.Auth

r

Class Details

class EDataServer.SoupAuthBearer(**kwargs)
Bases:

Soup.Auth

Abstract:

No

Structure:

EDataServer.SoupAuthBearerClass

Contains only private data that should be read and manipulated using the functions below.

New in version 3.10.

is_expired()
Returns:

Whether the set token is expired. It is considered expired even if the EDataServer.SoupAuthBearer.set_access_token() was called set yet.

Return type:

bool

New in version 3.24.

set_access_token(access_token, expires_in_seconds)
Parameters:
  • access_token (str) – an OAuth 2.0 access token

  • expires_in_seconds (int) – expiry for access_token, or 0 if unknown

This function is analogous to Soup.Auth.authenticate() for “Basic” HTTP authentication, except it takes an OAuth 2.0 access token instead of a username and password.

If expires_in_seconds is greater than zero, Soup.Auth.is_authenticated() will return False after the given number of seconds have elapsed.

New in version 3.10.