## EpcPasswordDialog EpcPasswordDialog — common password dialog |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

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

    struct              EpcPasswordDialogClass;
                        EpcPasswordDialogPrivate;
    struct              EpcPasswordDialog;

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

    void                epc_password_dialog_set_anonymous_allowed
                                                            (EpcPasswordDialog *dialog,
                                                             gboolean allowed);
    gboolean            epc_password_dialog_get_anonymous_allowed
                                                            (EpcPasswordDialog *dialog);
    void                epc_password_dialog_set_anonymous   (EpcPasswordDialog *dialog,
                                                             gboolean anonymous);
    gboolean            epc_password_dialog_is_anonymous    (EpcPasswordDialog *dialog);
    void                epc_password_dialog_set_username    (EpcPasswordDialog *dialog,
                                                             const gchar *username);
    const gchar *       epc_password_dialog_get_username    (EpcPasswordDialog *dialog);
    void                epc_password_dialog_set_password    (EpcPasswordDialog *dialog,
                                                             const gchar *password);
    const gchar *       epc_password_dialog_get_password    (EpcPasswordDialog *dialog);
    void                epc_password_dialog_set_realm       (EpcPasswordDialog *dialog,
                                                             const gchar *realm);
    const gchar *       epc_password_dialog_get_realm       (EpcPasswordDialog *dialog);

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

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkWidget
                   +----GtkContainer
                         +----GtkBin
                               +----GtkWindow
                                     +----GtkDialog
                                           +----EpcPasswordDialog

## Implemented Interfaces

EpcPasswordDialog implements AtkImplementorIface and GtkBuildable.

## Properties

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

## Description

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

## Details

### 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.

### 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.

`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()`

`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()`

`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.

`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()`

`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.

`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.

`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.

`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.

`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.

`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.

`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.

`dialog` : | a EpcPasswordDialog
`consumer` : | the EpcConsumer

## Property Details

### The `"anonymous"` property

      "anonymous"                gboolean              : Read / Write / Construct

Try to use anonymous authentication.

Default value: FALSE

### The `"anonymous-allowed"` property

      "anonymous-allowed"        gboolean              : Read / Write / Construct

Show widget to allow anonymous authentication.

Default value: TRUE

### The `"password"` property

      "password"                 gchar*                : Read / Write / Construct

The password to use for authentication.

Default value: NULL

### The `"realm"` property

      "realm"                    gchar*                : Read / Write / Construct

The authentication realm the dialog is used for.

Default value: NULL

### The `"username"` property

      "username"                 gchar*                : Read / Write / Construct

The username to use for authentication.

Default value: "murrayc"