EpcPasswordDialog: Easy Publish and Consume Reference Manual

## EpcPasswordDialog EpcPasswordDialog — common password dialog |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GtkWidget * | epc_password_dialog_new ()
void | epc_password_dialog_set_anonymous_allowed ()
gboolean | epc_password_dialog_get_anonymous_allowed ()
void | epc_password_dialog_set_anonymous ()
gboolean | epc_password_dialog_is_anonymous ()
void | epc_password_dialog_set_username ()
const gchar * | epc_password_dialog_get_username ()
void | epc_password_dialog_set_password ()
const gchar * | epc_password_dialog_get_password ()
void | epc_password_dialog_set_realm ()
const gchar * | epc_password_dialog_get_realm ()
void | epc_password_dialog_attach ()

## Properties

gboolean | anonymous | Read / Write / Construct
gboolean | anonymous-allowed | Read / Write / Construct
gchar * | password | Read / Write / Construct
gchar * | realm | Read / Write / Construct
gchar * | username | Read / Write / Construct

## Types and Values

struct | EpcPasswordDialogClass
| EpcPasswordDialogPrivate
struct | EpcPasswordDialog

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── GtkDialog
                                ╰── EpcPasswordDialog

## Implemented Interfaces

EpcPasswordDialog implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <libepc-ui/password-dialog.h>

## Description

The EpcPasswordDialog provides an user interface for the most common authentication scenarios.

## Functions

### epc_password_dialog_new ()

    GtkWidget *
    epc_password_dialog_new (const gchar *title,
                             GtkWindow *parent,
                             const gchar *realm,
                             const gchar *first_button_text,
                             ...);

Creates a new EpcPasswordDialog instance.

#### Parameters

title | title of the dialog, or `NULL` |
parent | transient parent of the dialog, or `NULL` |
realm | authentication realm, or `NULL` |
first_button_text | stock ID or text to go in first button, or `NULL` |
... | response ID for first button, then additional buttons, ending with NULL |

#### Returns

The newly created EpcEntropyWindow.

### epc_password_dialog_set_anonymous_allowed ()

    void
    epc_password_dialog_set_anonymous_allowed
                                   (EpcPasswordDialog *dialog,
                                    gboolean allowed);

Toggles anonymous authentication support. With anonymous authentication support an aditional checkbox for requesting anonymous authentication is shown. See “anonymous-allowed” for details.

See also: `epc_password_dialog_set_anonymous()`

#### Parameters

dialog | a EpcPasswordDialog |
allowed | the new anonymous authentication support flag |

### epc_password_dialog_get_anonymous_allowed ()

    gboolean
    epc_password_dialog_get_anonymous_allowed
                                   (EpcPasswordDialog *dialog);

Queries if anonymous authentication is supported. With anonymous authentication support an aditional checkbox for requesting anonymous authentication is shown. See “anonymous-allowed” for details.

See also: `epc_password_dialog_is_anonymous()`

#### Parameters

dialog | a EpcPasswordDialog |

#### Returns

`TRUE` if anonymous authentication is supported.

### epc_password_dialog_set_anonymous ()

    void
    epc_password_dialog_set_anonymous (EpcPasswordDialog *dialog,
                                       gboolean anonymous);

See also: `epc_password_dialog_set_anonymous_allowed()`

Changes the anonymous authentication state. See “anonymous” for details.

#### Parameters

dialog | a EpcPasswordDialog |
anonymous | the new anonymous authentication state |

### epc_password_dialog_is_anonymous ()

    gboolean
    epc_password_dialog_is_anonymous (EpcPasswordDialog *dialog);

Queries if anonymous authentication is requested. See “anonymous” for details.

See also: `epc_password_dialog_get_anonymous_allowed()`

#### Parameters

dialog | a EpcPasswordDialog |

#### Returns

`TRUE` if anonymous authentication is requested.

### epc_password_dialog_set_username ()

    void
    epc_password_dialog_set_username (EpcPasswordDialog *dialog,
                                      const gchar *username);

Changes the current user name of the dialog. See “username” for details.

#### Parameters

dialog | a EpcPasswordDialog |
username | the new username |

### epc_password_dialog_get_username ()

    const gchar *
    epc_password_dialog_get_username (EpcPasswordDialog *dialog);

Queries the current user name of the dialog. See “username” for details.

#### Parameters

dialog | a EpcPasswordDialog |

#### Returns

the current user name of the dialog.

### epc_password_dialog_set_password ()

    void
    epc_password_dialog_set_password (EpcPasswordDialog *dialog,
                                      const gchar *password);

Changes the current password of the dialog. See “password” for details.

#### Parameters

dialog | a EpcPasswordDialog |
password | the new password |

### epc_password_dialog_get_password ()

    const gchar *
    epc_password_dialog_get_password (EpcPasswordDialog *dialog);

Queries the current password of the dialog. See “password” for details.

#### Parameters

dialog | a EpcPasswordDialog |

#### Returns

the current password of the dialog.

### epc_password_dialog_set_realm ()

    void
    epc_password_dialog_set_realm (EpcPasswordDialog *dialog,
                                   const gchar *realm);

Changes the authentication realm the dialog shows. See “realm” for details.

#### Parameters

dialog | a EpcPasswordDialog |
realm | the new realm |

### epc_password_dialog_get_realm ()

    const gchar *
    epc_password_dialog_get_realm (EpcPasswordDialog *dialog);

Queries the authentication realm of the dialog. See “realm” for details.

#### Parameters

dialog | a EpcPasswordDialog |

#### Returns

the current realm of the dialog.

### epc_password_dialog_attach ()

    void
    epc_password_dialog_attach (EpcPasswordDialog *dialog,
                                EpcConsumer *consumer);

Installs a EpcPasswordDialog as authentication handler for some EpcConsumer by connecting to its “authenticate” and “reauthenticate” signals.

#### Parameters

dialog | a EpcPasswordDialog |
consumer | the EpcConsumer |

## Types and Values

### struct EpcPasswordDialogClass

    struct EpcPasswordDialogClass {
    };

Virtual methods of the EpcPasswordDialog class.

### EpcPasswordDialogPrivate

    typedef struct _EpcPasswordDialogPrivate EpcPasswordDialogPrivate;

Private fields of the EpcPasswordDialog class.

### struct EpcPasswordDialog

    struct EpcPasswordDialog;

Public fields of the EpcPasswordDialog class.

## Property Details

### The `“anonymous”` property

      “anonymous”                gboolean

Try to use anonymous authentication.

Flags: Read / Write / Construct

Default value: FALSE

### The `“anonymous-allowed”` property

      “anonymous-allowed”        gboolean

Show widget to allow anonymous authentication.

Flags: Read / Write / Construct

Default value: TRUE

### The `“password”` property

      “password”                 gchar *

The password to use for authentication.

Flags: Read / Write / Construct

Default value: NULL

### The `“realm”` property

      “realm”                    gchar *

The authentication realm the dialog is used for.

Flags: Read / Write / Construct

Default value: NULL

### The `“username”` property

      “username”                 gchar *

The username to use for authentication.

Flags: Read / Write / Construct

Default value: "murrayc"