wordpress-mobile/WordPressKit-iOS

Implement AtomicAuthenticationServiceRemote.

diegoreymendez opened this issue · 0 comments

Implement class AtomicAuthenticationServiceRemote with a method to perform a GET request to:

https://public-api.wordpress.com/wpcom/v2/sites/atomicdiegotravel.wordpress.com/atomic-auth-proxy/read-access-cookies

No parameters are required although the bearer token must be sent.

The return valuewill be JSON data looking like this:

{"url":"https://atomicdiegotravel.wpcomstaging.com",
"cookies" [{
    "expires":1582858181,
    "path":"/",
    "domain":"atomicdiegotravel.wpcomstaging.com",
    "name":"wordpress_logged_in_<some_value>",
    "value":"<data_removed>"
}]}

Parse this return data into a new object type named RemoteCookie and return it on success.