EDataServer.MsOapxbc¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class EDataServer.MsOapxbc(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new_sync(client_id, authority, cancellable)¶
- Parameters:
client_id (
str) – a client ID of the broker client (UUID string).authority (
str) – an authority URL of the OAuth2 servicecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a new
EDataServer.MsOapxbc- Return type:
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 (returnNone).New in version 3.54.
- acquire_prt_sso_cookie_sync(account, sso_url, scopes, redirect_uri, cancellable)¶
- Parameters:
account (
Json.Object) – an account returned fromEDataServer.MsOapxbc.get_accounts_sync()sso_url (
str) – an SSO URL to acquire the PRT SSO cookie for.scopes (
Json.Array) – array of scopesredirect_uri (
str) – redirect URIcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
an acquired cookie, or
Noneon error- Return type:
Soup.CookieorNone
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 byEDataServer.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.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
the accounts, or
Noneon error- Return type:
Json.ObjectorNone
Synchronously calls getAccounts() D-Bus method on the Microsoft OAuth2 broker service and returns the result as a
Json.Object.The
Json.Objectcontains the accounts that are currently registered at the broker, whereby the “accounts” node provides aJson.Arrayof 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 toEDataServer.MsOapxbc.acquire_prt_sso_cookie_sync().New in version 3.54.