summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2022-08-21 00:57:33 +0200
committerMarcus Lundblad <ml@dfupdate.se>2022-08-24 21:21:16 +0200
commitca2535f071e333d99b30ecfd01b1c22e546e264d (patch)
tree648c7b2158d1fbe08a302518ff61a387c4af774f /lib
parent702dadb8ec063bc1245d37a2e4cbdb87d79f3954 (diff)
downloadgnome-maps-ca2535f071e333d99b30ecfd01b1c22e546e264d.tar.gz
Migrate to OAuth2 for OSM editingwip/mlundblad/osm-oauth2
librest has dropped OAuth 1 support. And also, there are flaws of the OAuth 1 protocol and it has been recommended to migrate to OAuth 2 for some time now. Switch from using OAuth 1.1a to OAuth 2.0 for authenticating for OSM editing. Since there's a new token, users will have to re-authorize with their OSM account before editing. The gsettings key for identifying a "logged in" account has been changed to "osm-username-oauth2".
Diffstat (limited to 'lib')
-rw-r--r--lib/maps-osm-oauth-proxy-call.c6
-rw-r--r--lib/maps-osm-oauth-proxy-call.h10
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/maps-osm-oauth-proxy-call.c b/lib/maps-osm-oauth-proxy-call.c
index 5e9e7544..47359c60 100644
--- a/lib/maps-osm-oauth-proxy-call.c
+++ b/lib/maps-osm-oauth-proxy-call.c
@@ -33,7 +33,7 @@ struct _MapsOSMOAuthProxyCallPrivate
};
G_DEFINE_TYPE_WITH_PRIVATE(MapsOSMOAuthProxyCall, maps_osm_oauth_proxy_call,
- OAUTH_TYPE_PROXY_CALL);
+ REST_TYPE_OAUTH2_PROXY_CALL);
static gboolean
maps_osm_oauth_proxy_call_serialize_params (RestProxyCall *call,
@@ -85,9 +85,9 @@ maps_osm_oauth_proxy_call_init (MapsOSMOAuthProxyCall *call)
}
MapsOSMOAuthProxyCall *
-maps_osm_oauth_proxy_call_new (OAuthProxy *proxy, const char *payload)
+maps_osm_oauth_proxy_call_new (RestOAuth2Proxy *proxy, const char *payload)
{
- g_return_val_if_fail (OAUTH_IS_PROXY (proxy), NULL);
+ g_return_val_if_fail (REST_IS_OAUTH2_PROXY (proxy), NULL);
g_return_val_if_fail (payload != NULL, NULL);
MapsOSMOAuthProxyCall *call =
diff --git a/lib/maps-osm-oauth-proxy-call.h b/lib/maps-osm-oauth-proxy-call.h
index e9c240d8..03c6a363 100644
--- a/lib/maps-osm-oauth-proxy-call.h
+++ b/lib/maps-osm-oauth-proxy-call.h
@@ -22,8 +22,8 @@
#include <glib-object.h>
-#include <rest/oauth-proxy-call.h>
-#include <rest/oauth-proxy.h>
+#include <rest/rest-oauth2-proxy-call.h>
+#include <rest/rest-oauth2-proxy.h>
G_BEGIN_DECLS
@@ -40,17 +40,17 @@ typedef struct _MapsOSMOAuthProxyCallClass MapsOSMOAuthProxyCallClass;
struct _MapsOSMOAuthProxyCall
{
- OAuthProxyCall parent;
+ RestOAuth2ProxyCall parent;
MapsOSMOAuthProxyCallPrivate *priv;
};
struct _MapsOSMOAuthProxyCallClass
{
- OAuthProxyCallClass parent_class;
+ RestOAuth2ProxyCallClass parent_class;
};
GType maps_osm_oauth_proxy_call_get_type(void);
-MapsOSMOAuthProxyCall *maps_osm_oauth_proxy_call_new (OAuthProxy *proxy,
+MapsOSMOAuthProxyCall *maps_osm_oauth_proxy_call_new (RestOAuth2Proxy *proxy,
const char *content);
G_END_DECLS