| Modifier and Type | Class and Description |
|---|---|
| public static class | BasicAuthenticator.
Parser for an 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 | Field and Description |
|---|---|
| private Charset | |
| private String | |
| private final Log | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | doAuthenticate(Request
The request that triggered the authentication request, HttpServletResponse The response associated with the request response)Implements abstract org. Provided for sub-classes to implement their specific authentication mechanism. |
| protected String | getAuthMethod()
Implements abstract org. Return the authentication method, which is vendor-specific and not defined by HttpServletRequest. |
| public String | |
| public boolean | |
| protected boolean | isPreemptiveAuthPossible(Request
The request to check for credentials request)Overrides org. Can the authenticator perform preemptive authentication for the given request? |
| public void | |
| public void |
| charset | back to summary |
|---|---|
| private Charset charset | |
| charsetString | back to summary |
|---|---|
| private String charsetString | |
| log | back to summary |
|---|---|
| private final Log log Hides org. | |
| trimCredentials | back to summary |
|---|---|
| private boolean trimCredentials | |
| BasicAuthenticator | back to summary |
|---|---|
| public BasicAuthenticator() | |
| doAuthenticate | back to summary |
|---|---|
| protected boolean doAuthenticate(Request request, HttpServletResponse response) throws IOException Implements abstract org. Doc from org. Provided for sub-classes to implement their specific authentication mechanism.
| |
| getAuthMethod | back to summary |
|---|---|
| protected String getAuthMethod() Implements abstract org. Doc from org. Return the authentication method, which is vendor-specific and not defined by HttpServletRequest. | |
| getCharset | back to summary |
|---|---|
| public String getCharset() | |
| getTrimCredentials | back to summary |
|---|---|
| public boolean getTrimCredentials() | |
| isPreemptiveAuthPossible | back to summary |
|---|---|
| protected boolean isPreemptiveAuthPossible(Request request) Overrides org. Doc from org. Can the authenticator perform preemptive authentication for the given request? | |
| setCharset | back to summary |
|---|---|
| public void setCharset(String charsetString) | |
| setTrimCredentials | back to summary |
|---|---|
| public void setTrimCredentials(boolean trimCredentials) | |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteChunk | |
| private int | |
| private int | |
| private final Charset | |
| private final int | |
| private static final String | |
| private String | |
| private final boolean | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | BasicCredentials(ByteChunk
The header value to parse in-place input, Charset The character set to use to convert the bytes to a string charset, boolean Should leading and trailing whitespace be removed from the parsed credentials trimCredentials)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 |
|---|---|
| public String | Returns: the decoded password token as a String, ornull if no password was found in the
credentials.Trivial accessor. |
| public String | Returns: the decoded username token as a String, which is never benull, but can be empty.Trivial accessor. |
| private byte[] | |
| private void | |
| private void |
| authorization | back to summary |
|---|---|
| private final ByteChunk authorization | |
| base64blobLength | back to summary |
|---|---|
| private int base64blobLength | |
| base64blobOffset | back to summary |
|---|---|
| private int base64blobOffset | |
| charset | back to summary |
|---|---|
| private final Charset charset | |
| initialOffset | back to summary |
|---|---|
| private final int initialOffset | |
| METHOD | back to summary |
|---|---|
| private static final String METHOD | |
| password | back to summary |
|---|---|
| private String password | |
| trimCredentials | back to summary |
|---|---|
| private final boolean trimCredentials | |
| username | back to summary |
|---|---|
| private String username | |
| BasicCredentials | back to summary |
|---|---|
| public BasicCredentials(ByteChunk input, Charset charset, boolean trimCredentials) throws IllegalArgumentException 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.
| |
| getPassword | back to summary |
|---|---|
| public String getPassword() Trivial accessor.
| |
| getUsername | back to summary |
|---|---|
| public String getUsername() Trivial accessor.
| |
| parseBase64 | back to summary |
|---|---|
| private byte[] parseBase64() throws IllegalArgumentException | |
| parseCredentials | back to summary |
|---|---|
| private void parseCredentials(byte[] decoded) throws IllegalArgumentException | |
| parseMethod | back to summary |
|---|---|
| private void parseMethod() throws IllegalArgumentException | |