Download
Entwicklung
Konto
Download
Entwicklung
Anmelden
Vergessen Konto/Passwort
Konto erstellen
Sprache
Hilfe
Sprache
Hilfe
×
Anmelden
Anmeldename
Passwort
×
Vergessen Konto/Passwort
Übersetzungsstatus von Deutsch
Kategorie:
Software
Personen
PersonalForge
Magazine
Wiki
Suche
OSDN
>
Finden Software
>
Software Development
>
Interpreters
>
Mysaifu JVM
>
Ticket-Liste / Suche
>
Ticket #12418
Mysaifu JVM
Beschreibung
Projekt Zusammenfassung
Entwickler-Dashboard
Web-Seite
Entwickler
Bildergalerie
RSS Feed-Liste
Aktivität
Statistiken
Historie
Downloads
Aller Releases-Liste
Statistiken
Quellcode
Quellcode-Repositorys-Liste
Subversion
Repository ansehen
Ticket
Ticket-Liste
Liste der Meilensteine
Typenliste
Komponentenliste
Liste der zuletzt benutzten Tickets/RSS
Neue Ticket abschicken
Dokumente
Kommunikation
Alle Mailinglisten
mysaifujvm-announce
Neuigkeiten
Ticket #12418
Ticket-Liste
Neue Ticket abschicken
RSS
java.net.Authenticator doesn't work
Eröffnet am:
2008-04-27 11:46
Letztes Update:
2008-04-29 12:02
beobachte
ON
OFF
Auswertung:
(Anonym)
Verantwortlicher:
freebeans
Typ:
Fehler
Status:
Offen [Owner assigned]
Komponente:
v0.3.7
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Accepted
Datei:
Keine
Details
The following lines of code add HTTP BASIC
Authentication Header Token to the http request
message, like
"Authorization: Basic base64encoded(username:password)".
The code works fine under desktop JVM, while in
mysaifu, 401 UNAUTHORIZED is returned.
Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication
getPasswordAuthentication() {
return new PasswordAuthentication
(username, password.toCharArray());
}
});
Ticket-Verlauf (3/3 Historien)
2008-04-28 09:44
Aktualisiert von:
freebeans
Verantwortlicher
Update from
(Keine)
to
freebeans
Lösung
Update from
Keine
to
Accepted
2008-04-29 10:41
Aktualisiert von:
freebeans
Kommentar
Logged In: YES
user_id=14530
I checked source code of gnu.java.net package, I'm not sure
bug it seems that GNU Classpath does not support
java.net.Authenticator.
2008-04-29 12:02
Aktualisiert von: None
Kommentar
Logged In: NO
No biggie. I have a workaround of adding an HTTP BASIC
Authentication header via java.net.HttpURLConnection class
as follows,
httpURLConnection.setRequestProperty("Authorization",
"Basic
"+Base64.encodeBytes((username+":"+password).getBytes()));
along with the Base64 class from here,
http://iharder.sourceforge.net/current/java/base64/
Thanks
Dateianhangliste (
0
)
Dateianhangliste
Keine Anhänge
Bearbeiten
Please login to add comment to this ticket »
Anmelden
Authentication Header Token to the http request
message, like
"Authorization: Basic base64encoded(username:password)".
The code works fine under desktop JVM, while in
mysaifu, 401 UNAUTHORIZED is returned.
Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication
getPasswordAuthentication() {
return new PasswordAuthentication
(username, password.toCharArray());
}
});