Merge lp:~mandel/ubuntu-system-settings/invalidate-credentials into lp:ubuntu-system-settings

Proposed by Manuel de la Peña
Status: Work in progress
Proposed branch: lp:~mandel/ubuntu-system-settings/invalidate-credentials
Merge into: lp:ubuntu-system-settings
Prerequisite: lp:~ken-vandine/ubuntu-system-settings/emit_credentials_deleted
Diff against target: 24 lines (+9/-5)
1 file modified
plugins/system-update/update_manager.cpp (+9/-5)
To merge this branch: bzr merge lp:~mandel/ubuntu-system-settings/invalidate-credentials
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
dobey (community) Disapprove
Ubuntu Touch System Settings Pending
Review via email: mp+269092@code.launchpad.net

Commit message

Invalidate creds in the sso service when they are not valid.

Description of the change

Even when we find creds in the system, they ight be invalid. This branch ensure that it they are not the system invalidates them and we are requested to log before even looking for updates.

To post a comment you must log in.
1512. By Manuel de la Peña

Readd wrongly deleted line.

Revision history for this message
dobey (dobey) wrote :

This is wrong.

The isValid() method on the Token object does not validate the token against the server. It only validates that the token object has all the data fields necessary to sign a request. Any token you get in the signal as a result of the request to get the credentials, from libubuntuoneauth, will be valid in that sense.

review: Disapprove
Revision history for this message
Manuel de la Peña (mandel) wrote :

Lame... We will need to do a lot more work to fix this :-/

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

changing to work in progress to get out of the review queue since the previous comment showed issues that need to be resolved

Unmerged revisions

1512. By Manuel de la Peña

Readd wrongly deleted line.

1511. By Manuel de la Peña

Invalidate credentials if they are found yet not valid.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/system-update/update_manager.cpp'
2--- plugins/system-update/update_manager.cpp 2015-08-25 16:39:45 +0000
3+++ plugins/system-update/update_manager.cpp 2015-08-25 16:39:45 +0000
4@@ -164,11 +164,15 @@
5
6 void UpdateManager::handleCredentialsFound(Token token)
7 {
8- m_token = token;
9- QStringList args("list");
10- args << "--manifest";
11- QString command = getClickCommand();
12- m_process.start(command, args);
13+ if (token.isValid()) {
14+ m_token = token;
15+ QStringList args("list");
16+ args << "--manifest";
17+ QString command = getClickCommand();
18+ m_process.start(command, args);
19+ } else {
20+ m_service.invalidateCredentials();
21+ }
22 }
23
24 QString UpdateManager::getClickCommand()

Subscribers

People subscribed via source and target branches