Package org.apache.juneau.http.header
Class Authorization
java.lang.Object
org.apache.juneau.http.header.HttpHeaderBean
org.apache.juneau.http.header.HttpStringHeader
org.apache.juneau.http.header.Authorization
- All Implemented Interfaces:
HttpHeader
Represents an HTTP Authorization header.
Authentication credentials for HTTP authentication.
See Also:
- Since:
- 9.2.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFluent builder for assembling an HTTPAuthorization credentials value. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthorization(String value) Constructor with an eager value.Authorization(Supplier<String> valueSupplier) Constructor with a lazy value supplier. -
Method Summary
Modifier and TypeMethodDescriptionstatic Authorization.Builderstatic Authorization.BuilderCreates aAuthorization.Builderpre-populated withBearer credentials.static Authorization.Buildercreate()Creates a new emptyAuthorization.Builder.static Authorization.Builderdigest()Creates aAuthorization.Builderpre-populated with aDigest scheme.static AuthorizationStatic factory method with an eager value.static AuthorizationStatic factory method with a lazy value supplier.Methods inherited from class org.apache.juneau.http.header.HttpStringHeader
of, of, ofPairMethods inherited from class org.apache.juneau.http.header.HttpHeaderBean
equals, equalsIgnoreCase, getName, getValue, hashCode, toString
-
Field Details
-
NAME
The header name- See Also:
-
-
Constructor Details
-
Authorization
Constructor with an eager value.- Parameters:
value- The header value. May benull .
-
Authorization
Constructor with a lazy value supplier.- Parameters:
valueSupplier- Supplier for the header value. Must not benull .
-
-
Method Details
-
of
Static factory method with an eager value.- Parameters:
value- The header value. May benull .- Returns:
- A new instance. Never
null .
-
of
Static factory method with a lazy value supplier.- Parameters:
valueSupplier- Supplier for the header value. Must not benull .- Returns:
- A new instance. Never
null .
-
create
Creates a new emptyAuthorization.Builder.- Returns:
- A new builder. Never
null .
-
basic
- Parameters:
user- The username. Must not benull .password- The password. Must not benull .- Returns:
- A new builder. Never
null .
-
bearer
Creates aAuthorization.Builderpre-populated withBearer credentials.- Parameters:
token- The bearer token. Must not benull .- Returns:
- A new builder. Never
null .
-
digest
Creates aAuthorization.Builderpre-populated with aDigest scheme.- Returns:
- A new builder. Never
null .
-