JAL-3130 adapted getdown src. attempt 2. first attempt failed due to cp'ed .git files
[jalview.git] / getdown / src / getdown / core / src / main / java / com / threerings / getdown / spi / ProxyAuth.java
1 //
2 // Getdown - application installer, patcher and launcher
3 // Copyright (C) 2004-2018 Getdown authors
4 // https://github.com/threerings/getdown/blob/master/LICENSE
5
6 package com.threerings.getdown.spi;
7
8 /**
9  * A service provider interface that handles the storage of proxy credentials.
10  */
11 public interface ProxyAuth
12 {
13     /** Credentials for a proxy server. */
14     public static class Credentials {
15         public final String username;
16         public final String password;
17         public Credentials (String username, String password) {
18             this.username = username;
19             this.password = password;
20         }
21     }
22
23     /**
24      * Loads the credentials for the app installed in {@code appDir}.
25      */
26     public Credentials loadCredentials (String appDir);
27
28     /**
29      * Encrypts and saves the credentials for the app installed in {@code appDir}.
30      */
31     public void saveCredentials (String appDir, String username, String password);
32 }