## PolkitTemporaryAuthorization PolkitTemporaryAuthorization — Temporary Authorizations |

## Functions

const gchar * | polkit_temporary_authorization_get_id ()
const gchar * | polkit_temporary_authorization_get_action_id ()
PolkitSubject * | polkit_temporary_authorization_get_subject ()
guint64 | polkit_temporary_authorization_get_time_obtained ()
guint64 | polkit_temporary_authorization_get_time_expires ()

## Types and Values

| PolkitTemporaryAuthorization

## Object Hierarchy

        GObject
        ╰── PolkitTemporaryAuthorization

## Description

Object used to describe a temporary authorization.

## Functions

### polkit_temporary_authorization_get_id ()

    const gchar *
    polkit_temporary_authorization_get_id (PolkitTemporaryAuthorization *authorization);

Gets the opaque identifier for `authorization` .

#### Parameters

authorization | A PolkitTemporaryAuthorization. |

#### Returns

A string owned by `authorization` . Do not free.

### polkit_temporary_authorization_get_action_id ()

    const gchar *
    polkit_temporary_authorization_get_action_id
                                   (PolkitTemporaryAuthorization *authorization);

Gets the action that `authorization` is for.

#### Parameters

authorization | A PolkitTemporaryAuthorization. |

#### Returns

A string owned by `authorization` . Do not free.

### polkit_temporary_authorization_get_subject ()

    PolkitSubject *
    polkit_temporary_authorization_get_subject
                                   (PolkitTemporaryAuthorization *authorization);

Gets the subject that `authorization` is for.

#### Parameters

authorization | A PolkitTemporaryAuthorization. |

#### Returns

A PolkitSubject, free with `g_object_unref()`.

[transfer full]

### polkit_temporary_authorization_get_time_obtained ()

    guint64
    polkit_temporary_authorization_get_time_obtained
                                   (PolkitTemporaryAuthorization *authorization);

Gets the time when `authorization` was obtained.

(Note that the PolicyKit daemon is using monotonic time internally so the returned value may change if system time changes.)

#### Parameters

authorization | A PolkitTemporaryAuthorization. |

#### Returns

Seconds since the Epoch Jan 1. 1970, 0:00 UTC.

### polkit_temporary_authorization_get_time_expires ()

    guint64
    polkit_temporary_authorization_get_time_expires
                                   (PolkitTemporaryAuthorization *authorization);

Gets the time when `authorization` will expire.

(Note that the PolicyKit daemon is using monotonic time internally so the returned value may change if system time changes.)

#### Parameters

authorization | A PolkitTemporaryAuthorization. |

#### Returns

Seconds since the Epoch Jan 1. 1970, 0:00 UTC.

## Types and Values

### PolkitTemporaryAuthorization

    typedef struct _PolkitTemporaryAuthorization PolkitTemporaryAuthorization;

The PolkitTemporaryAuthorization struct should not be accessed directly.