EDataServer.MsOapxbc

g EDataServer.MsOapxbc EDataServer.MsOapxbc GObject.Object GObject.Object GObject.Object->EDataServer.MsOapxbc

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new_sync (client_id, authority, cancellable)

acquire_prt_sso_cookie_sync (account, sso_url, scopes, redirect_uri, cancellable)

get_accounts_sync (cancellable)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class EDataServer.MsOapxbc(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

EDataServer.MsOapxbcClass

classmethod new_sync(client_id, authority, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a new EDataServer.MsOapxbc

Return type:

EDataServer.MsOapxbc or None

Synchronously create a new EDataServer.MsOapxbc. This initiates the communication with a locally running Microsoft Identity broker service via D-Bus. In case the broker is not running, it is started. If no broker is registered, this function will fail (return None).

New in version 3.54.

Parameters:
Raises:

GLib.Error

Returns:

an acquired cookie, or None on error

Return type:

Soup.Cookie or None

Synchronously calls acquirePrtSsoCookie() D-Bus method on the Microsoft OAuth2 broker service and converts the result into a new Soup.Cookie. The account object needs to be taken from the accounts list that is returned by EDataServer.MsOapxbc.get_accounts_sync(). The SSO URL is the OAuth2 authentication endpoint. The scopes are the requested scopes for the OAuth2 service (usually only https://graph.microsoft.com/.default). The redirect URI is the OAuth2 service redirect URI.

New in version 3.54.

get_accounts_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable

Raises:

GLib.Error

Returns:

the accounts, or None on error

Return type:

Json.Object or None

Synchronously calls getAccounts() D-Bus method on the Microsoft OAuth2 broker service and returns the result as a Json.Object.

The Json.Object contains the accounts that are currently registered at the broker, whereby the “accounts” node provides a Json.Array of account entries. Note, that the availability of the types and entries needs to be checked by the caller before accessing them. The accounts entries can be inspected e.g. for the “username” and “homeAccountId” fields. Then, one entry needs to be selected and passed as-is to EDataServer.MsOapxbc.acquire_prt_sso_cookie_sync().

New in version 3.54.