| Modifier and Type | Class and Description |
|---|---|
| public static enum | DigestAuthenticator.
This enum exists because RFC 7616 and Java use different names for some digests. |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private List | algorithms
Algorithms to use for WWW-Authenticate challenges. |
| private static final DigestAuthenticator. | |
| protected String | key
Private key. |
| protected long | lastTimestamp
The last timestamp used to generate a nonce. |
| protected final Object | |
| private final Log | |
| private static final String | |
| protected int | nonceCacheSize
Maximum number of server nonces to keep in the cache. |
| protected int | nonceCountWindowSize
The window size to use to track seen nonce count values for a given nonce. |
| protected Map | nonces
List of server nonce values currently being tracked |
| protected long | nonceValidity
How long server nonces are valid for in milliseconds. |
| protected String | opaque
Opaque string. |
| private static final Map | |
| protected static final String | QOP
Tomcat's DIGEST implementation only supports auth quality of protection. |
| protected boolean | validateUri
Should the URI be validated as required by RFC2617? |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | doAuthenticate(Request
Request we are processing request, HttpServletResponse Response we are creating response)Implements abstract org. Authenticate the user making this request, based on the specified login configuration. |
| protected String | Returns: The generated nonceHTTP Servlet request request)Generate a unique token. |
| public String | |
| protected String | getAuthMethod()
Implements abstract org. Return the authentication method, which is vendor-specific and not defined by HttpServletRequest. |
| public String | |
| public int | |
| public int | |
| public long | |
| public String | |
| private void | |
| protected boolean | isPreemptiveAuthPossible(Request
The request to check for credentials request)Overrides org. Can the authenticator perform preemptive authentication for the given request? |
| public boolean | |
| protected static String | Returns: The unquoted stringThe quoted string quotedString, boolean true if quotes were requiredRemoves the quotes on a string. |
| protected static String | Returns: The unquoted stringThe quoted string quotedString)Removes the quotes on a string. |
| public void | |
| protected void | setAuthenticateHeader(HttpServletRequest
HTTP Servlet request request, HttpServletResponse HTTP Servlet response response, String nonce token nonce, boolean true to add a stale parameterGenerates the WWW-Authenticate header(s) as per RFC 7616. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| protected void | startInternal()
Overrides org. Start this component and implement the requirements of
|
| algorithms | back to summary |
|---|---|
| private List<DigestAuthenticator. Algorithms to use for WWW-Authenticate challenges. | |
| FALLBACK_DIGEST | back to summary |
|---|---|
| private static final DigestAuthenticator. | |
| key | back to summary |
|---|---|
| protected String key Private key. | |
| lastTimestamp | back to summary |
|---|---|
| protected long lastTimestamp The last timestamp used to generate a nonce. Each nonce should get a unique timestamp. | |
| lastTimestampLock | back to summary |
|---|---|
| protected final Object lastTimestampLock | |
| log | back to summary |
|---|---|
| private final Log log Hides org. | |
| NONCE_DIGEST | back to summary |
|---|---|
| private static final String NONCE_DIGEST | |
| nonceCacheSize | back to summary |
|---|---|
| protected int nonceCacheSize Maximum number of server nonces to keep in the cache. If not specified, the default value of 1000 is used. | |
| nonceCountWindowSize | back to summary |
|---|---|
| protected int nonceCountWindowSize The window size to use to track seen nonce count values for a given nonce. If not specified, the default of 100 is used. | |
| nonces | back to summary |
|---|---|
| protected Map<String, DigestAuthenticator. List of server nonce values currently being tracked | |
| nonceValidity | back to summary |
|---|---|
| protected long nonceValidity How long server nonces are valid for in milliseconds. Defaults to 5 minutes. | |
| opaque | back to summary |
|---|---|
| protected String opaque Opaque string. | |
| PERMITTED_ALGORITHMS | back to summary |
|---|---|
| private static final Map<String, DigestAuthenticator. | |
| QOP | back to summary |
|---|---|
| protected static final String QOP Tomcat's DIGEST implementation only supports auth quality of protection. | |
| validateUri | back to summary |
|---|---|
| protected boolean validateUri Should the URI be validated as required by RFC2617? Can be disabled in reverse proxies where the proxy has modified the URI. | |
| DigestAuthenticator | back to summary |
|---|---|
| public DigestAuthenticator() | |
| doAuthenticate | back to summary |
|---|---|
| protected boolean doAuthenticate(Request request, HttpServletResponse response) throws IOException Implements abstract org. Authenticate the user making this request, based on the specified login configuration. Return
| |
| generateNonce | back to summary |
|---|---|
| protected String generateNonce(Request request) Generate a unique token. The token is generated according to the following pattern. NOnceToken = Base64 ( NONCE_DIGEST ( client-IP ":" time-stamp ":" private-key ) ). | |
| getAlgorithms | back to summary |
|---|---|
| public String getAlgorithms() | |
| 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. | |
| getKey | back to summary |
|---|---|
| public String getKey() | |
| getNonceCacheSize | back to summary |
|---|---|
| public int getNonceCacheSize() | |
| getNonceCountWindowSize | back to summary |
|---|---|
| public int getNonceCountWindowSize() | |
| getNonceValidity | back to summary |
|---|---|
| public long getNonceValidity() | |
| getOpaque | back to summary |
|---|---|
| public String getOpaque() | |
| initAlgorithms | back to summary |
|---|---|
| private void initAlgorithms(List<DigestAuthenticator. | |
| isPreemptiveAuthPossible | back to summary |
|---|---|
| protected boolean isPreemptiveAuthPossible(Request request) Overrides org. Doc from org. Can the authenticator perform preemptive authentication for the given request? | |
| isValidateUri | back to summary |
|---|---|
| public boolean isValidateUri() | |
| removeQuotes | back to summary |
|---|---|
| protected static String removeQuotes(String quotedString, boolean quotesRequired) Removes the quotes on a string. RFC2617 states quotes are optional for all parameters except realm. | |
| removeQuotes | back to summary |
|---|---|
| protected static String removeQuotes(String quotedString) Removes the quotes on a string. | |
| setAlgorithms | back to summary |
|---|---|
| public void setAlgorithms(String algorithmsString) | |
| setAuthenticateHeader | back to summary |
|---|---|
| protected void setAuthenticateHeader(HttpServletRequest request, HttpServletResponse response, String nonce, boolean isNonceStale) Generates the WWW-Authenticate header(s) as per RFC 7616.
| |
| setKey | back to summary |
|---|---|
| public void setKey(String key) | |
| setNonceCacheSize | back to summary |
|---|---|
| public void setNonceCacheSize(int nonceCacheSize) | |
| setNonceCountWindowSize | back to summary |
|---|---|
| public void setNonceCountWindowSize(int nonceCountWindowSize) | |
| setNonceValidity | back to summary |
|---|---|
| public void setNonceValidity(long nonceValidity) | |
| setOpaque | back to summary |
|---|---|
| public void setOpaque(String opaque) | |
| setValidateUri | back to summary |
|---|---|
| public void setValidateUri(boolean validateUri) | |
| startInternal | back to summary |
|---|---|
| protected void startInternal() throws LifecycleException Overrides org. Doc from org. Start this component and implement the requirements of
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final DigestAuthenticator. | |
| private final String | |
| public static final DigestAuthenticator. | |
| public static final DigestAuthenticator. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public static DigestAuthenticator. | |
| public static DigestAuthenticator. |
| javaName | back to summary |
|---|---|
| private final String javaName | |
| MD5 | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| rfcName | back to summary |
|---|---|
| private final String rfcName | |
| SHA_256 | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| SHA_512_256 | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| AuthDigest | back to summary |
|---|---|
| private AuthDigest(String javaName, String rfcName) | |
| getJavaName | back to summary |
|---|---|
| public String getJavaName() | |
| getRfcName | back to summary |
|---|---|
| public String getRfcName() | |
| valueOf | back to summary |
|---|---|
| public static DigestAuthenticator. | |
| values | back to summary |
|---|---|
| public static DigestAuthenticator. | |
| Modifier and Type | Field and Description |
|---|---|
| private DigestAuthenticator. | |
| private String | |
| private final String | |
| private String | |
| private String | |
| private String | |
| private final Map | |
| private boolean | |
| private final long | |
| private final String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | DigestInfo(String opaque, long nonceValidity, String key, Map<String, DigestAuthenticator.
|
| Modifier and Type | Method and Description |
|---|---|
| public Principal | |
| public String | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean |
| algorithm | back to summary |
|---|---|
| private DigestAuthenticator. | |
| cnonce | back to summary |
|---|---|
| private String cnonce | |
| key | back to summary |
|---|---|
| private final String key | |
| method | back to summary |
|---|---|
| private String method | |
| nc | back to summary |
|---|---|
| private String nc | |
| nonce | back to summary |
|---|---|
| private String nonce | |
| nonces | back to summary |
|---|---|
| private final Map<String, DigestAuthenticator. | |
| nonceStale | back to summary |
|---|---|
| private boolean nonceStale | |
| nonceValidity | back to summary |
|---|---|
| private final long nonceValidity | |
| opaque | back to summary |
|---|---|
| private final String opaque | |
| opaqueReceived | back to summary |
|---|---|
| private String opaqueReceived | |
| qop | back to summary |
|---|---|
| private String qop | |
| realmName | back to summary |
|---|---|
| private String realmName | |
| response | back to summary |
|---|---|
| private String response | |
| uri | back to summary |
|---|---|
| private String uri | |
| userName | back to summary |
|---|---|
| private String userName | |
| validateUri | back to summary |
|---|---|
| private boolean validateUri | |
| DigestInfo | back to summary |
|---|---|
| public DigestInfo(String opaque, long nonceValidity, String key, Map<String, DigestAuthenticator. | |
| authenticate | back to summary |
|---|---|
| public Principal authenticate(Realm realm) | |
| getUsername | back to summary |
|---|---|
| public String getUsername() | |
| isNonceStale | back to summary |
|---|---|
| public boolean isNonceStale() | |
| parse | back to summary |
|---|---|
| public boolean parse(Request request, String authorization) | |
| validate | back to summary |
|---|---|
| public boolean validate(Request request)
Deprecated
| |
| validate | back to summary |
|---|---|
| public boolean validate(Request request, List<DigestAuthenticator. | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final int | |
| private final boolean[] | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public synchronized boolean |
| count | back to summary |
|---|---|
| private int count | |
| offset | back to summary |
|---|---|
| private final int offset | |
| seen | back to summary |
|---|---|
| private final boolean[] seen | |
| timestamp | back to summary |
|---|---|
| private final long timestamp | |
| NonceInfo | back to summary |
|---|---|
| public NonceInfo(long currentTime, int seenWindowSize) | |
| getTimestamp | back to summary |
|---|---|
| public long getTimestamp() | |
| nonceCountValid | back to summary |
|---|---|
| public synchronized boolean nonceCountValid(long nonceCount) | |