1
0
mirror of https://github.com/etesync/android synced 2025-07-05 14:22:37 +00:00
etesync-android/app/src/main/java/at/bitfire/davdroid/ui/setup/LoginCredentials.java
Ricki Hirner bab84d7d0f Improve HTTP authentication
* use preemptive Basic auth automatically for HTTPS connections
* cache auth parameters (Basic/Digest)
2016-08-05 23:20:19 +02:00

50 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Copyright © 2013 2016 Ricki Hirner (bitfire web engineering).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
package at.bitfire.davdroid.ui.setup;
import android.os.Parcel;
import android.os.Parcelable;
import java.net.URI;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class LoginCredentials implements Parcelable {
public final URI uri;
public final String userName, password;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeSerializable(uri);
dest.writeString(userName);
dest.writeString(password);
}
public static final Creator CREATOR = new Creator<LoginCredentials>() {
@Override
public LoginCredentials createFromParcel(Parcel source) {
return new LoginCredentials(
(URI)source.readSerializable(),
source.readString(), source.readString()
);
}
@Override
public LoginCredentials[] newArray(int size) {
return new LoginCredentials[size];
}
};
}