EDataServer.OAuth2Services¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class EDataServer.OAuth2Services(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Contains only private data that should be read and manipulated using the functions below.
New in version 3.28.
- classmethod is_oauth2_alias_static(auth_method)¶
- Parameters:
auth_method (
str
orNone
) – an authentication method, orNone
- Returns:
whether exists any
EDataServer.OAuth2Service
, with the same name as auth_method.- Return type:
This is the same as
EDataServer.OAuth2Services.is_oauth2_alias
(), except it creates its ownEDataServer.OAuth2Services
instance and frees it at the end. TheEDataServer.OAuth2Services
is implemented as a singleton, thus it won’t be much trouble, as long as there is something else having created one instance.New in version 3.28.
- classmethod is_supported()¶
- Returns:
True
, when evolution-data-server had been compiled with OAuth2 authentication enabled,False
otherwise.- Return type:
New in version 3.28.
- classmethod new()¶
- Returns:
- Return type:
Creates a new
EDataServer.OAuth2Services
instance.New in version 3.28.
- add(service)¶
- Parameters:
service (
EDataServer.OAuth2Service
) – anEDataServer.OAuth2Service
to add
Adds the service to the list of known OAuth2 services into self. It also adds a reference to service.
New in version 3.28.
- find(source)¶
- Parameters:
source (
EDataServer.Source
) – anEDataServer.Source
- Returns:
a referenced
EDataServer.OAuth2Service
, which can be used with given source, orNone
, when none was found.- Return type:
Searches the list of currently known OAuth2 services for the one which can be used with the given source.
The returned
EDataServer.OAuth2Service
is referenced for thread safety, if found.New in version 3.28.
- guess(protocol, hostname)¶
- Parameters:
- Returns:
a referenced
EDataServer.OAuth2Service
, which can be used with given constraints, orNone
, when none was found.- Return type:
Searches the list of currently known OAuth2 services for the one which can be used with the given protocol and/or hostname. Any of protocol and hostname can be
None
, but not both. It’s up to eachEDataServer.OAuth2Service
to decide, which of the arguments are important and whether all or only any of them can be required.The returned
EDataServer.OAuth2Service
is referenced for thread safety, if found.New in version 3.28.
- is_oauth2_alias(auth_method)¶
- Parameters:
auth_method (
str
orNone
) – an authentication method, orNone
- Returns:
whether exists any
EDataServer.OAuth2Service
, with the same name as auth_method.- Return type:
New in version 3.28.
- list()¶
- Returns:
a newly allocated
GLib.SList
with all currently knownEDataServer.OAuth2Service
referenced instances- Return type:
Lists all currently known services, which had been added with
EDataServer.OAuth2Services.add
(). Free the returnedGLib.SList
with g_slist_remove_full (known_services,GObject.Object.unref
); when no longer needed.New in version 3.28.
- remove(service)¶
- Parameters:
service (
EDataServer.OAuth2Service
) – anEDataServer.OAuth2Service
to remove
Removes the service from the list of known services in self. The function does nothing, if the service had not been added.
New in version 3.28.