EDataServer.SourceAuthentication

g EDataServer.SourceAuthentication EDataServer.SourceAuthentication EDataServer.SourceExtension EDataServer.SourceExtension EDataServer.SourceExtension->EDataServer.SourceAuthentication GObject.Object GObject.Object GObject.Object->EDataServer.SourceExtension

Subclasses:None

Methods

Inherited:EDataServer.SourceExtension (4), GObject.Object (37)
Structs:GObject.ObjectClass (5)
  dup_credential_name ()
  dup_host ()
  dup_method ()
  dup_proxy_uid ()
  dup_user ()
  get_credential_name ()
  get_host ()
  get_is_external ()
  get_method ()
  get_port ()
  get_proxy_uid ()
  get_remember_password ()
  get_user ()
  ref_connectable ()
  required ()
  set_credential_name (credential_name)
  set_host (host)
  set_is_external (is_external)
  set_method (method)
  set_port (port)
  set_proxy_uid (proxy_uid)
  set_remember_password (remember_password)
  set_user (user)

Virtual Methods

Inherited:GObject.Object (7)

Properties

Inherited:EDataServer.SourceExtension (1)
Name Type Flags Short Description
connectable Gio.SocketConnectable r A Gio.SocketConnectable constructed from the host and port properties
credential-name str r/w/c/en What name to use for the authentication method in credentials for authentication
host str r/w/c/en Host name for the remote account
is-external bool r/w/c/en Whether the authentication is done by another authentication manager (like any Single Sign On daemon)
method str r/w/c/en Authentication method
port int r/w/c/en Port number for the remote account
proxy-uid str r/w/c/en EDataServer.Source UID of a proxy profile
remember-password bool r/w/c/en Whether to offer to remember the password by default when prompted
user str r/w/c/en User name for the remote account

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent EDataServer.SourceExtension r  

Class Details

class EDataServer.SourceAuthentication(**kwargs)
Bases:EDataServer.SourceExtension
Abstract:No
Structure:EDataServer.SourceAuthenticationClass

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

New in version 3.6.

dup_credential_name()
Returns:a newly-allocated copy of EDataServer.SourceAuthentication :credential-name
Return type:str

Thread-safe variation of EDataServer.SourceAuthentication.get_credential_name(). Use this function when accessing self from multiple threads.

The returned string should be freed with GLib.free() when no longer needed.

New in version 3.16.

dup_host()
Returns:a newly-allocated copy of EDataServer.SourceAuthentication :host
Return type:str

Thread-safe variation of EDataServer.SourceAuthentication.get_host(). Use this function when accessing self from multiple threads.

The returned string should be freed with GLib.free() when no longer needed.

New in version 3.6.

dup_method()
Returns:a newly-allocated copy of EDataServer.SourceAuthentication :method
Return type:str

Thread-safe variation of EDataServer.SourceAuthentication.get_method(). Use this function when accessing self from multiple threads.

The returned string should be freed with GLib.free() when no longer needed.

New in version 3.6.

dup_proxy_uid()
Returns:a newly-allocated copy of EDataServer.SourceAuthentication :proxy-uid
Return type:str

Thread-safe variation of EDataServer.SourceAuthentication.get_proxy_uid(). Use this function when accessing self from multiple threads.

The returned string should be freed with GLib.free() when no longer needed.

New in version 3.12.

dup_user()
Returns:a newly-allocated copy of EDataServer.SourceAuthentication :user
Return type:str

Thread-safe variation of EDataServer.SourceAuthentication.get_user(). Use this function when accessing self from multiple threads.

The returned string should be freed with GLib.free() when no longer needed.

New in version 3.6.

get_credential_name()
Returns:the credential name to use for authentication, or None
Return type:str

Returns the credential name used to pass the stored or gathered credential (like password) into the EDataServer.Source.invoke_authenticate(). This is a counterpart of the authentication method. The None means to use the default name, which is EDataServer.SOURCE_CREDENTIAL_PASSWORD.

New in version 3.16.

get_host()
Returns:the host name of a remote account
Return type:str

Returns the host name used to authenticate to a remote account.

New in version 3.6.

get_is_external()
Returns:True if the authentication is done by an external application, False otherwise
Return type:bool

Get if the authentication is done by an external application such as a Single Sign On application (e.g. GNOME Online Accounts)

New in version 3.36.

get_method()
Returns:the authentication method for a remote account
Return type:str

Returns the authentication method for a remote account. There are no pre-defined method names; backends are free to set this however they wish. If authentication is not required for a remote account, the convention is to set EDataServer.SourceAuthentication :method to “none”.

New in version 3.6.

get_port()
Returns:the port number of a remote account
Return type:int

Returns the port number used to authenticate to a remote account.

New in version 3.6.

get_proxy_uid()
Returns:the proxy profile EDataServer.Source :uid
Return type:str

Returns the EDataServer.Source :uid of the EDataServer.Source that holds network proxy settings for use when connecting to a remote account.

New in version 3.12.

get_remember_password()
Returns:whether to offer to remember the password by default
Return type:bool

Returns whether to offer to remember the provided password by default in password prompts. This way, if the user unchecks the option it will be unchecked by default in future password prompts.

New in version 3.10.

get_user()
Returns:the user name of a remote account
Return type:str

Returns the user name used to authenticate to a remote account.

New in version 3.6.

ref_connectable()
Returns:a Gio.SocketConnectable, or None
Return type:Gio.SocketConnectable

Returns a Gio.SocketConnectable instance constructed from self’s EDataServer.SourceAuthentication :host and EDataServer.SourceAuthentication :port properties, or None if the EDataServer.SourceAuthentication :host is not set.

The returned Gio.SocketConnectable is referenced for thread-safety and must be unreferenced with GObject.Object.unref() when finished with it.

New in version 3.8.

required()
Returns:whether authentication is required at all
Return type:bool

This is a convenience function which returns whether authentication is required at all, regardless of the method used. This relies on the convention of setting EDataServer.SourceAuthentication :method to “none” when authentication is not required.

New in version 3.6.

set_credential_name(credential_name)
Parameters:credential_name (str or None) – a credential name, or None

Sets the credential name used to pass the stored or gathered credential (like password) into the EDataServer.Source.invoke_authenticate(). This is a counterpart of the authentication method. The None means to use the default name, which is EDataServer.SOURCE_CREDENTIAL_PASSWORD.

The internal copy of credential_name is automatically stripped of leading and trailing whitespace. If the resulting string is empty, None is set instead.

New in version 3.16.

set_host(host)
Parameters:host (str or None) – a host name, or None

Sets the host name used to authenticate to a remote account.

The internal copy of host is automatically stripped of leading and trailing whitespace. If the resulting string is empty, None is set instead.

New in version 3.6.

set_is_external(is_external)
Parameters:is_external (bool) – True if the authentication is done using an external application, False otherwise

Set if the authentication is done by an external application such as a Single Sign On application (e.g. GNOME Online Accounts)

New in version 3.36.

set_method(method)
Parameters:method (str or None) – authentication method, or None

Sets the authentication method for a remote account. There are no pre-defined method names; backends are free to set this however they wish. If authentication is not required for a remote account, the convention is to set the method to “none”. In keeping with that convention, EDataServer.SourceAuthentication :method will be set to “none” if method is None or an empty string.

New in version 3.6.

set_port(port)
Parameters:port (int) – a port number

Sets the port number used to authenticate to a remote account.

New in version 3.6.

set_proxy_uid(proxy_uid)
Parameters:proxy_uid (str) – the proxy profile EDataServer.Source :uid

Sets the EDataServer.Source :uid of the EDataServer.Source that holds network proxy settings for use when connecting to a remote account.

New in version 3.12.

set_remember_password(remember_password)
Parameters:remember_password (bool) – whether to offer to remember the password by default

Sets whether to offer to remember the provided password by default in password prompts. This way, if the user unchecks the option it will be unchecked by default in future password prompts.

New in version 3.10.

set_user(user)
Parameters:user (str or None) – a user name, or None

Sets the user name used to authenticate to a remote account.

The internal copy of user is automatically stripped of leading and trailing whitespace. If the resulting string is empty, None is set instead.

New in version 3.6.

Property Details

EDataServer.SourceAuthentication.props.connectable
Name:connectable
Type:Gio.SocketConnectable
Default Value:None
Flags:READABLE

A Gio.SocketConnectable constructed from the host and port properties

EDataServer.SourceAuthentication.props.credential_name
Name:credential-name
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

What name to use for the authentication method in credentials for authentication

EDataServer.SourceAuthentication.props.host
Name:host
Type:str
Default Value:''
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

Host name for the remote account

EDataServer.SourceAuthentication.props.is_external
Name:is-external
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

Whether the authentication is done by another authentication manager (like any Single Sign On daemon)

EDataServer.SourceAuthentication.props.method
Name:method
Type:str
Default Value:'none'
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

Authentication method

EDataServer.SourceAuthentication.props.port
Name:port
Type:int
Default Value:0
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

Port number for the remote account

EDataServer.SourceAuthentication.props.proxy_uid
Name:proxy-uid
Type:str
Default Value:'system-proxy'
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

EDataServer.Source UID of a proxy profile

EDataServer.SourceAuthentication.props.remember_password
Name:remember-password
Type:bool
Default Value:True
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

Whether to offer to remember the password by default when prompted

EDataServer.SourceAuthentication.props.user
Name:user
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

User name for the remote account