blob: 1797eb45982365484f64155d1a531c53d27f6f10 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.webkit;
18
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080019import android.os.Handler;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080020
21/**
Iain Merrick10229b22010-08-31 11:57:15 +010022 * HTTP authentication request that must be handled by the user interface.
23 * WebView creates the object and hands it to the current {@link WebViewClient},
24 * which must call either {@link #proceed(String, String)} or {@link #cancel()}.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080025 */
26public class HttpAuthHandler extends Handler {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027
28 /**
Iain Merrick10229b22010-08-31 11:57:15 +010029 * Package-private constructor needed for API compatibility.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030 */
Iain Merrick10229b22010-08-31 11:57:15 +010031 HttpAuthHandler() {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032 }
33
34 /**
35 * @return True if we can use user credentials on record
36 * (ie, if we did not fail trying to use them last time)
37 */
38 public boolean useHttpAuthUsernamePassword() {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039 return false;
40 }
41
42 /**
Iain Merrick10229b22010-08-31 11:57:15 +010043 * Cancel the authorization request.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044 */
Iain Merrick10229b22010-08-31 11:57:15 +010045 public void cancel() {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080046 }
47
48 /**
Iain Merrick10229b22010-08-31 11:57:15 +010049 * Proceed with the authorization with the given credentials.
Steve Blockc877c6b2010-03-12 18:49:48 +000050 */
Iain Merrick10229b22010-08-31 11:57:15 +010051 public void proceed(String username, String password) {
Steve Blockc6a90a52010-03-25 15:38:04 +000052 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080053}