Package org.openstreetmap.josm.io.auth

Examples of org.openstreetmap.josm.io.auth.CredentialsAgent.store()


        try {
            PasswordAuthentication pa = new PasswordAuthentication(
                    tfProxyHttpUser.getText().trim(),
                    tfProxyHttpPassword.getPassword()
            );
            cm.store(RequestorType.PROXY, tfProxyHttpHost.getText(), pa);
        } catch(CredentialsAgentException e) {
            Main.error(e);
        }
    }
}
View Full Code Here


        try {
            PasswordAuthentication pa = new PasswordAuthentication(
                    tfOsmUserName.getText().trim(),
                    tfOsmPassword.getPassword()
            );
            cm.store(RequestorType.SERVER, OsmApi.getOsmApi().getHost(), pa);
        } catch (CredentialsAgentException e) {
            Main.error(e);
            Main.warn(tr("Failed to save OSM credentials to credential manager."));
            Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.