blob: 7be6fef3d2c58e575d2f10ce4f6d09d584807112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.sync.net;
import java.security.GeneralSecurityException;
import ch.boye.httpclientandroidlib.Header;
import ch.boye.httpclientandroidlib.client.methods.HttpRequestBase;
import ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient;
import ch.boye.httpclientandroidlib.protocol.BasicHttpContext;
/**
* An <code>AuthHeaderProvider</code> generates HTTP Authorization headers for
* HTTP requests.
*/
public interface AuthHeaderProvider {
/**
* Generate an HTTP Authorization header.
*
* @param request HTTP request.
* @param context HTTP context.
* @param client HTTP client.
* @return HTTP Authorization header.
* @throws GeneralSecurityException usually wrapping a more specific exception.
*/
Header getAuthHeader(HttpRequestBase request, BasicHttpContext context, DefaultHttpClient client)
throws GeneralSecurityException;
}
|