<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
<refentry id="gdbus-org.freedesktop.NetworkManager.SecretAgent">
  <refmeta>    <refentrytitle role="top_of_page" id="gdbus-interface-org-freedesktop-NetworkManager-SecretAgent.top_of_page">org.freedesktop.NetworkManager.SecretAgent</refentrytitle>
  <indexterm zone="gdbus-interface-org-freedesktop-NetworkManager-SecretAgent.top_of_page"><primary sortas=".SecretAgent">org.freedesktop.NetworkManager.SecretAgent</primary></indexterm>
  </refmeta>  <refnamediv>    <refname>org.freedesktop.NetworkManager.SecretAgent</refname>    <refpurpose>User Secret Agent</refpurpose>  </refnamediv>  <refsynopsisdiv role="synopsis">
    <title role="synopsis.title">Methods</title>
    <synopsis>
<link linkend="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.GetSecrets">GetSecrets</link>       (IN  a{sa{sv}} connection,
                  IN  o         connection_path,
                  IN  s         setting_name,
                  IN  as        hints,
                  IN  u         flags,
                  OUT a{sa{sv}} secrets);
<link linkend="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.CancelGetSecrets">CancelGetSecrets</link> (IN  o         connection_path,
                  IN  s         setting_name);
<link linkend="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.SaveSecrets">SaveSecrets</link>      (IN  a{sa{sv}} connection,
                  IN  o         connection_path);
<link linkend="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.DeleteSecrets">DeleteSecrets</link>    (IN  a{sa{sv}} connection,
                  IN  o         connection_path);
</synopsis>
  </refsynopsisdiv>
<refsect1 role="desc" id="gdbus-interface-org-freedesktop-NetworkManager-SecretAgent">
  <title role="desc.title">Description</title>
  <para>
Private D-Bus interface used by secret agents that store and provide
secrets to NetworkManager. If an agent provides secrets to NetworkManager
as part of connection creation, and the some of those secrets are "agent
owned" the agent should store those secrets itself and should not expect
its SaveSecrets() method to be called. SaveSecrets() will be called eg if
some program other than the agent itself (like a connection editor)
changes the secrets out of band. The agent should implement this D-Bus
interface on an object with the path
/org/freedesktop/NetworkManager/SecretAgent.
</para>
</refsect1>
<refsect1 role="details" id="gdbus-methods-org.freedesktop.NetworkManager.SecretAgent">
  <title role="details.title">Method Details</title>
<refsect2 role="method" id="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.GetSecrets">
  <title>The GetSecrets() method</title>
  <indexterm zone="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.GetSecrets"><primary sortas=".SecretAgent.GetSecrets">org.freedesktop.NetworkManager.SecretAgent.GetSecrets()</primary></indexterm>
<programlisting>
GetSecrets (IN  a{sa{sv}} connection,
            IN  o         connection_path,
            IN  s         setting_name,
            IN  as        hints,
            IN  u         flags,
            OUT a{sa{sv}} secrets);
</programlisting>
<para>
Retrieve and return stored secrets, if any, or request new secrets from
the agent's user. If user interaction is allowed and the user enters new
secrets, the agent is expected to save the new secrets to persistent
storage (if the secret's flags include AGENT_OWNED) as NetworkManager will
not send these secrets back to the same agent via a SaveSecrets() call. If
the user canceled any interaction, the agent should return the
UserCanceled error (see below).
</para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN a{sa{sv}} <parameter>connection</parameter></literal>:</term>
  <listitem><para>
Nested settings maps containing the connection for which secrets are being requested. This may contain system-owned secrets if the agent has successfully authenticated to modify system network settings and the GetSecrets request flags allow user interaction.
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN o <parameter>connection_path</parameter></literal>:</term>
  <listitem><para>
Object path of the connection for which secrets are being requested.
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN s <parameter>setting_name</parameter></literal>:</term>
  <listitem><para>
Setting name for which secrets are being requested.
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN as <parameter>hints</parameter></literal>:</term>
  <listitem><para>
Array of strings of key names in the requested setting for which NetworkManager thinks a secrets may be required, and/or well-known identifiers and data that may be useful to the client in processing the secrets request. Note that it's not always possible to determine which secret is required, so in some cases no hints may be given. The Agent should return any secrets it has, or that it thinks are required, regardless of what hints NetworkManager sends in this request. Some hints have special prefixes that provide information to the agent; for example, VPN requests may send server-specific messages prefixed with "x-vpn-message:".
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN u <parameter>flags</parameter></literal>:</term>
  <listitem><para>
(<link linkend="NMSecretAgentGetSecretsFlags">NMSecretAgentGetSecretsFlags</link>) Flags which modify the behavior of the secrets request. If true, new secrets are assumed to be invalid or incorrect, and the agent should ask the user for new secrets. If false, existing secrets should be retrieved from storage and returned without interrupting the user.
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>OUT a{sa{sv}} <parameter>secrets</parameter></literal>:</term>
  <listitem><para>
Nested settings maps containing secrets. Each setting MUST contain at least the 'name' field, containing the name of the setting, and one or more secrets.
</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.CancelGetSecrets">
  <title>The CancelGetSecrets() method</title>
  <indexterm zone="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.CancelGetSecrets"><primary sortas=".SecretAgent.CancelGetSecrets">org.freedesktop.NetworkManager.SecretAgent.CancelGetSecrets()</primary></indexterm>
<programlisting>
CancelGetSecrets (IN  o connection_path,
                  IN  s setting_name);
</programlisting>
<para>
Cancel a pending GetSecrets request for secrets of the given connection.
Any GetSecrets request with the same 'connection_path' and 'setting_name'
that are given in a CancelGetSecrets request should be canceled.
</para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN o <parameter>connection_path</parameter></literal>:</term>
  <listitem><para>
Object path of the connection for which, if secrets for the given 'setting_name' are being requested, the request should be canceled.
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN s <parameter>setting_name</parameter></literal>:</term>
  <listitem><para>
Setting name for which secrets for this connection were originally being requested.
</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.SaveSecrets">
  <title>The SaveSecrets() method</title>
  <indexterm zone="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.SaveSecrets"><primary sortas=".SecretAgent.SaveSecrets">org.freedesktop.NetworkManager.SecretAgent.SaveSecrets()</primary></indexterm>
<programlisting>
SaveSecrets (IN  a{sa{sv}} connection,
             IN  o         connection_path);
</programlisting>
<para>
Save given secrets to backing storage.
</para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN a{sa{sv}} <parameter>connection</parameter></literal>:</term>
  <listitem><para>
Nested settings maps containing the entire connection (including secrets), for which the agent should save the secrets to backing storage. This method will not be called when the agent itself is the process creating or updating a connection; in that case the agent is assumed to have already saved those secrets since it had them already.
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN o <parameter>connection_path</parameter></literal>:</term>
  <listitem><para>
Object path of the connection for which the agent should save secrets to backing storage.
</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.DeleteSecrets">
  <title>The DeleteSecrets() method</title>
  <indexterm zone="gdbus-method-org-freedesktop-NetworkManager-SecretAgent.DeleteSecrets"><primary sortas=".SecretAgent.DeleteSecrets">org.freedesktop.NetworkManager.SecretAgent.DeleteSecrets()</primary></indexterm>
<programlisting>
DeleteSecrets (IN  a{sa{sv}} connection,
               IN  o         connection_path);
</programlisting>
<para>
Delete secrets from backing storage.
</para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN a{sa{sv}} <parameter>connection</parameter></literal>:</term>
  <listitem><para>
Nested settings maps containing the connection properties (sans secrets), for which the agent should delete the secrets from backing storage.
</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN o <parameter>connection_path</parameter></literal>:</term>
  <listitem><para>
Object path of the connection for which the agent should delete secrets from backing storage.
</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
</refentry>

