SignonAuthService

SignonAuthService — the authorization service object

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── SignonAuthService

Description

The SignonAuthService is the main object in this library. It provides top-level functions to query existing identities, available methods and their mechanisms.

Functions

SignonQueryMethodsCb ()

void
(*SignonQueryMethodsCb) (SignonAuthService *auth_service,
                         gchar **methods,
                         const GError *error,
                         gpointer user_data);

Callback to be passed to signon_auth_service_query_methods().

Parameters

auth_service

the SignonAuthService.

 

methods

list of available methods.

[transfer full][type GStrv]

error

a GError if an error occurred, NULL otherwise.

 

user_data

the user data that was passed when installing this callback.

 

SignonQueryMechanismCb ()

void
(*SignonQueryMechanismCb) (SignonAuthService *auth_service,
                           const gchar *method,
                           gchar **mechanisms,
                           const GError *error,
                           gpointer user_data);

Callback to be passed to signon_auth_service_query_mechanisms().

Parameters

auth_service

the SignonAuthService.

 

method

the authentication method being inspected.

 

mechanisms

list of available mechanisms.

[transfer full][type GStrv]

error

a GError if an error occurred, NULL otherwise.

 

user_data

the user data that was passed when installing this callback.

 

SignonClearCb ()

void
(*SignonClearCb) (SignonAuthService *auth_service,
                  gboolean success,
                  const GError *error,
                  gpointer user_data);

Callback to be passed to signon_auth_service_clear().

Parameters

auth_service

the SignonAuthService.

 

success

TRUE if clear succeeded.

 

error

a GError if an error occurred, NULL otherwise.

 

user_data

the user data that was passed when installing this callback.

 

SignonQueryIdentitiesCb ()

void
(*SignonQueryIdentitiesCb) (SignonAuthService *auth_service,
                            SignonIdentityList *identities,
                            const GError *error,
                            gpointer user_data);

Callback to be passed to signon_auth_service_query_identities().

Parameters

auth_service

the SignonAuthService.

 

identities

GList based list of SignonIdentityInfo.

[transfer full]

error

a GError if an error occurred, NULL otherwise.

 

user_data

the user data that was passed when installing this callback.

 

signon_auth_service_new ()

SignonAuthService *
signon_auth_service_new ();

Create a new SignonAuthService.

Returns

an instance of an SignonAuthService.


signon_auth_service_query_methods ()

void
signon_auth_service_query_methods (SignonAuthService *auth_service,
                                   SignonQueryMethodsCb cb,
                                   gpointer user_data);

Lists all the available authentication methods.

Parameters

auth_service

the SignonAuthService.

 

cb

callback to be invoked.

[scope async]

user_data

user data.

 

signon_auth_service_query_mechanisms ()

void
signon_auth_service_query_mechanisms (SignonAuthService *auth_service,
                                      const gchar *method,
                                      SignonQueryMechanismCb cb,
                                      gpointer user_data);

Lists all the available mechanisms for an authentication method.

Parameters

auth_service

the SignonAuthService.

 

method

the name of the method whose mechanisms must be retrieved.

 

cb

callback to be invoked.

[scope async]

user_data

user data.

 

signon_auth_service_query_identities ()

void
signon_auth_service_query_identities (SignonAuthService *auth_service,
                                      SignonIdentityFilter *filter,
                                      const gchar *application_context,
                                      SignonQueryIdentitiesCb cb,
                                      gpointer user_data);

Query available identities, possibly applying a filter.

filter is a GHashTable that contains filter conditions in the form of string keys and GVariant values. Currently the following keys are supported:

  • "Owner". The value should be a SignonSecurityContext (use signon_security_context_build_variant() to create a GVariant). Identites whose owner doesn't match will be filtered out. This key has effect only if the requesting application is a keychain application as determined by GSignondAccessControlManager.

  • "Type". The value should be a SignonIdentityType.

  • "Caption". The value is a string, and only those identites whose caption begins with the supplied value will be returned.

The meaning of application_context is explained in SignonSecurityContext. It is used by GSignondAccessControlManager to determine if the requesting application is a keychain application. If it is, then all identites will be returned (subject to "Owner" key in filter ). If it's not, then only the identites which the application owns will be returned (but "Type" and "Caption" can still be set in the filter ).

Parameters

auth_service

the SignonAuthService.

 

filter

filter variant dictionary based on GHashTable.

 

application_context

application security context, can be NULL.

 

cb

callback to be invoked.

[scope async]

user_data

user data.

 

signon_auth_service_clear ()

void
signon_auth_service_clear (SignonAuthService *auth_service,
                           SignonClearCb cb,
                           gpointer user_data);

Clears / wipes out all stored data.

Parameters

auth_service

the SignonAuthService.

 

cb

callback to be invoked.

[scope async]

user_data

user data.

 

Types and Values

struct SignonAuthServiceClass

struct SignonAuthServiceClass {
    GObjectClass parent_class;
};

Opaque struct. Use the accessor functions below.

Members


struct SignonAuthService

struct SignonAuthService;

Opaque struct. Use the accessor functions below.


SignonIdentityList

typedef GList SignonIdentityList;

GList of SignonIdentity items.


SignonIdentityFilter

typedef GHashTable SignonIdentityFilter;

GHashTable based filter variant dictionary.