org.freedesktop.Flatpak.AuthenticatorRequest

org.freedesktop.Flatpak.AuthenticatorRequest

Methods

Close          ();
BasicAuthReply (IN  s     user,
                IN  s     password,
                IN  a{sv} options);

Signals

Webflow     (s     uri,
             a{sv} options);
WebflowDone (a{sv} options);
BasicAuth   (s     realm,
             a{sv} options);
Response    (u     response,
             a{sv} results);

Description

Method Details

The Close() method

Close ();

Closes the authenticator request to which this object refers and ends all related user interaction (dialogs, webflows etc).

A Response signal with the cancelled response will be emitted if the operation was cancelled. There is still a posibility of a race, so the operation might succeed or fail before processing the close request, so there is no guarantee that the operation will be cancelled.


The BasicAuthReply() method

BasicAuthReply (IN  s     user,
                IN  s     password,
                IN  a{sv} options);

Call to finish the request started with the BasicAuth signal.

IN s user:

The user

IN s password:

The password

IN a{sv} options:

An extensible dict with extra options.

Signal Details

The "Webflow" signal

Webflow (s     uri,
         a{sv} options);

Emitted by the authenticator when it needs to do web-based interaction. The client handles this by showing the URI in a graphical web view. Typically the uri includes information about a final redirect to a localhost uri that will happen when the operation is finished allowing the authenticator to get the result of the operation. This is similar to how OAUTH2 webflows typically work.

If at any point the user closes or otherwise dismisses the web view the client should call the org.freedesktop.Flatpak.AuthenticatorRequest.Close method to tell the authenticator that the operation is aborted.

s uri:

The uri to show

a{sv} options:

An extensible dict with extra options.


The "WebflowDone" signal

WebflowDone (a{sv} options);

Emitted by the authenticator when the web view is done, at this point the client can close the WebView.

a{sv} options:

An extensible dict with extra options.


The "BasicAuth" signal

BasicAuth (s     realm,
           a{sv} options);

Emitted by the authenticator when it needs to do a simple user + password authentication. This is only useful for very simple authentication interaction, but this is still used (for instance for http basic access authentication), and for those cases this allows a nicely integrated UI and CLI experience.

s realm:

String showing what the auth is for, similar to http basic auth realm.

a{sv} options:

An extensible dict with extra options.


The "Response" signal

Response (u     response,
          a{sv} results);

Emitted when the user interaction for a portal request is over. The response indicates how the user interaction ended:

0: Success, the request is carried out
1: The user cancelled the interaction
2: The user interaction was ended in some other way

In the case of an error (response 2) results can contain a error-message value describing what went wrong.

u response:

Numeric response

a{sv} results:

Vardict with results. The keys and values in the vardict depend on the request.