Snapd.AuthData

g GObject.Object GObject.Object Snapd.AuthData Snapd.AuthData GObject.Object->Snapd.AuthData

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (macaroon, discharges)

get_discharges ()

get_macaroon ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

discharges

[str]

r/w

Serialized discharges

macaroon

str

r/w

Serialized macaroon

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Snapd.AuthData(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Snapd.AuthDataClass

Snapd.AuthData contains authorization data used to communicate with snapd.

The authorization data is in the form of a Macaroon.

New in version 1.0.

classmethod new(macaroon, discharges)
Parameters:
  • macaroon (str) – serialized macaroon used to authorize access to snapd.

  • discharges ([str]) – serialized discharges.

Returns:

a new Snapd.AuthData

Return type:

Snapd.AuthData

Create some authorization data.

New in version 1.0.

get_discharges()
Returns:

the discharges as serialized strings.

Return type:

[str]

Get the discharges that this authorization uses.

New in version 1.0.

get_macaroon()
Returns:

the serialized Macaroon used to authorize access to snapd.

Return type:

str

Get the Macaroon that this authorization uses.

New in version 1.0.

Property Details

Snapd.AuthData.props.discharges
Name:

discharges

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE

Serialized discharges

Snapd.AuthData.props.macaroon
Name:

macaroon

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Serialized macaroon