/usr/share/gtk-doc/html/goa/ch01s03.html is in libgoa-1.0-doc 3.4.0-0ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Credentials Handling</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GNOME Online Accounts Reference Manual">
<link rel="up" href="overview-writing.html" title="Writing GOA applications">
<link rel="prev" href="ch01s02.html" title="Accessing Services">
<link rel="next" href="ref-dbus.html" title="Part II. D-Bus API Reference">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="ch01s02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="overview-writing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME Online Accounts Reference Manual</th>
<td><a accesskey="n" href="ref-dbus.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="idp5205440"></a>Credentials Handling</h2></div></div></div>
<p>
For accessing a service, the application typically needs to
present credentials. The application can request the
credentials via GOA. First the application should invoke the
<a class="link" href="gdbus-org.gnome.OnlineAccounts.Account.html#gdbus-method-org-gnome-OnlineAccounts-Account.EnsureCredentials" title="The EnsureCredentials() method">Account.EnsureCredentials()</a>
method on the account object. If this succeeds, the
application can request the credentials using e.g. <a class="link" href="gdbus-org.gnome.OnlineAccounts.OAuthBased.html#gdbus-method-org-gnome-OnlineAccounts-OAuthBased.GetAccessToken" title="The GetAccessToken() method">OAuthBased.GetAccessToken()</a>
or <a class="link" href="gdbus-org.gnome.OnlineAccounts.OAuth2Based.html#gdbus-method-org-gnome-OnlineAccounts-OAuth2Based.GetAccessToken" title="The GetAccessToken() method">OAuth2Based.GetAccessToken()</a>
depending on what kind of credentials the account is using.
If the service returns an authorization error (say, the access
token expired), the application should call <a class="link" href="gdbus-org.gnome.OnlineAccounts.Account.html#gdbus-method-org-gnome-OnlineAccounts-Account.EnsureCredentials" title="The EnsureCredentials() method">Account.EnsureCredentials()</a>
again to e.g. renew the credentials.
</p>
<p>
On the other hand, if <a class="link" href="gdbus-org.gnome.OnlineAccounts.Account.html#gdbus-method-org-gnome-OnlineAccounts-Account.EnsureCredentials" title="The EnsureCredentials() method">Account.EnsureCredentials()</a>
ever fails, then the user will get notified that there is a
problem with the account so he can take actions to fix it.
Applications can listen to changes on the <a class="link" href="gdbus-org.gnome.OnlineAccounts.Account.html#gdbus-property-org-gnome-OnlineAccounts-Account.AttentionNeeded" title='The "AttentionNeeded" property'>Account.AttentionNeeded</a>
property to get notified when it's time to try accessing the
account again.
</p>
<p>
Note that the implementation for a provider may switch from
e.g. OAuth to OAuth2 in a newer release of GNOME Online
Accounts. Therefore, applications must never assume that the
<a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for an account implements a fixed set of
interfaces.
</p>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|