Blame doc/html/ch01s03.html

Packit 79f644
Packit 79f644
<html>
Packit 79f644
<head>
Packit 79f644
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 79f644
<title>Credentials Handling: GNOME Online Accounts Reference Manual</title>
Packit 79f644
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit 79f644
<link rel="home" href="index.html" title="GNOME Online Accounts Reference Manual">
Packit 79f644
<link rel="up" href="overview-writing.html" title="Writing GOA applications">
Packit 79f644
<link rel="prev" href="ch01s02.html" title="Accessing Services">
Packit 79f644
<link rel="next" href="ref-dbus.html" title="Part II. D-Bus API Reference">
Packit 79f644
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
Packit 79f644
<link rel="stylesheet" href="style.css" type="text/css">
Packit 79f644
</head>
Packit 79f644
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 79f644
Packit 79f644
Packit 79f644
Home
Packit 79f644
Up
Packit 79f644
Prev
Packit 79f644
Next
Packit 79f644
Packit 79f644
Packit 79f644

Packit 79f644
Credentials Handling
Packit 79f644

Packit 79f644
        For accessing a service, the application typically needs to
Packit 79f644
        present credentials. The application can request the
Packit 79f644
        credentials via GOA. First the application should invoke the
Packit 79f644
        Account.EnsureCredentials()
Packit 79f644
        method on the account object. If this succeeds, the
Packit 79f644
        application can request the credentials using e.g.  OAuthBased.GetAccessToken()
Packit 79f644
        or OAuth2Based.GetAccessToken()
Packit 79f644
        depending on what kind of credentials the account is using.
Packit 79f644
        If the service returns an authorization error (say, the access
Packit 79f644
        token expired), the application should call Account.EnsureCredentials()
Packit 79f644
        again to e.g. renew the credentials.
Packit 79f644
      

Packit 79f644

Packit 79f644
        On the other hand, if Account.EnsureCredentials()
Packit 79f644
        ever fails, then the user will get notified that there is a
Packit 79f644
        problem with the account so he can take actions to fix it.
Packit 79f644
        Applications can listen to changes on the Account.AttentionNeeded
Packit 79f644
        property to get notified when it's time to try accessing the
Packit 79f644
        account again.
Packit 79f644
      

Packit 79f644

Packit 79f644
        Note that the implementation for a provider may switch from
Packit 79f644
        e.g. OAuth to OAuth2 in a newer release of GNOME Online
Packit 79f644
        Accounts. Therefore, applications must never assume that the
Packit 79f644
        GoaObject for an account implements a fixed set of
Packit 79f644
        interfaces.
Packit 79f644
      

Packit 79f644
Packit 79f644
Packit 79f644

Generated by GTK-Doc V1.28
Packit 79f644
</body>
Packit 79f644
</html>