001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.http; 014 015import org.apache.juneau.http.annotation.*; 016 017/** 018 * Represents a parsed <l>Proxy-Authorization</l> HTTP request header. 019 * 020 * <p> 021 * Authorization credentials for connecting to a proxy. 022 * 023 * <h5 class='figure'>Example</h5> 024 * <p class='bcode w800'> 025 * Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== 026 * </p> 027 * 028 * <h5 class='topic'>RFC2616 Specification</h5> 029 * 030 * The Proxy-Authorization request-header field allows the client to identify itself (or its user) to a proxy which 031 * requires authentication. 032 * The Proxy-Authorization field value consists of credentials containing the authentication information of the user 033 * agent for the proxy and/or realm of the resource being requested. 034 * 035 * <p class='bcode w800'> 036 * Proxy-Authorization = "Proxy-Authorization" ":" credentials 037 * </p> 038 * 039 * <p> 040 * The HTTP access authentication process is described in "HTTP Authentication: Basic and Digest Access Authentication". 041 * Unlike Authorization, the Proxy-Authorization header field applies only to the next outbound proxy that demanded 042 * authentication using the Proxy-Authenticate field. 043 * When multiple proxies are used in a chain, the Proxy-Authorization header field is consumed by the first outbound 044 * proxy that was expecting to receive credentials. 045 * A proxy MAY relay the credentials from the client request to the next proxy if that is the mechanism by which the 046 * proxies cooperatively authenticate a given request. 047 * 048 * <ul class='seealso'> 049 * <li class='extlink'>{@doc RFC2616} 050 * </ul> 051 */ 052@Header("Proxy-Authorization") 053public final class ProxyAuthorization extends HeaderString { 054 055 /** 056 * Returns a parsed <c>Proxy-Authorization</c> header. 057 * 058 * @param value The <c>Proxy-Authorization</c> header string. 059 * @return The parsed <c>Proxy-Authorization</c> header, or <jk>null</jk> if the string was null. 060 */ 061 public static ProxyAuthorization forString(String value) { 062 if (value == null) 063 return null; 064 return new ProxyAuthorization(value); 065 } 066 067 private ProxyAuthorization(String value) { 068 super(value); 069 } 070}