protected static class BasicAuthenticator.BasicCredentials
extends java.lang.Object
Constructor and Description |
---|
BasicAuthenticator.BasicCredentials(ByteChunk input,
java.nio.charset.Charset charset)
Parse the HTTP Authorization header for BASIC authentication
as per RFC 2617 section 2, and the Base64 encoded credentials
as per RFC 2045 section 6.8.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPassword()
Trivial accessor.
|
java.lang.String |
getUsername()
Trivial accessor.
|
public BasicAuthenticator.BasicCredentials(ByteChunk input, java.nio.charset.Charset charset) throws java.lang.IllegalArgumentException
input
- The header value to parse in-placecharset
- The character set to use to convert the bytes to a
stringjava.lang.IllegalArgumentException
- If the header does not conform
to RFC 2617public java.lang.String getUsername()
null
, but can be empty.public java.lang.String getPassword()
null
if no password was found in the credentials.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.