@@ -70,12 +70,17 @@ public RequestEntityRestStorageService open(final ProxyFinder proxy, final HostK
7070 return super .open (proxy , hostcallback , login , cancel );
7171 }
7272
73+ /**
74+ * Unlock vault using universal vault format metadata payload after verifying credentials
75+ */
7376 @ Override
7477 public void login (final LoginCallback prompt , final CancelCallback cancel ) throws BackgroundException {
7578 try {
7679 final Credentials credentials = backend .getHost ().getCredentials ().withOauth (keychain .findOAuthTokens (backend .getHost ()));
77- log .debug ("Login to {} with credentials {}" , backend . getHost (), credentials );
80+ log .debug ("Verify credentials {} with {}" , credentials , backend );
7881 backend .login (prompt , cancel );
82+ log .debug ("Verify credentials {} with {}" , host .getCredentials (), host );
83+ super .login (prompt , cancel );
7984 final Path home = new DelegatingHomeFeature (new DefaultPathHomeFeature (host )).find ();
8085 log .debug ("Attempting to locate vault in {}" , home );
8186 final Vault vault = VaultFactory .get (home );
@@ -97,6 +102,5 @@ public Credentials prompt(final Host bookmark, final String title, final String
97102 catch (ApiException | SecurityFailure | AccessException e ) {
98103 throw new LoginFailureException (LocaleFactory .localizedString ("Login failed" , "Credentials" ), e );
99104 }
100- super .login (prompt , cancel );
101105 }
102106}
0 commit comments