Package org.eclipse.jetty.client.util
Class DigestAuthentication.DigestResult
- java.lang.Object
-
- org.eclipse.jetty.client.util.DigestAuthentication.DigestResult
-
- All Implemented Interfaces:
Authentication.Result
- Enclosing class:
- DigestAuthentication
private class DigestAuthentication.DigestResult extends java.lang.Object implements Authentication.Result
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
algorithm
private byte[]
content
private HttpHeader
header
private java.lang.String
nonce
private java.util.concurrent.atomic.AtomicInteger
nonceCount
private java.lang.String
opaque
private java.lang.String
password
private java.lang.String
qop
private java.lang.String
realm
private java.lang.String
user
-
Constructor Summary
Constructors Constructor Description DigestResult(HttpHeader header, byte[] content, java.lang.String realm, java.lang.String user, java.lang.String password, java.lang.String algorithm, java.lang.String nonce, java.lang.String qop, java.lang.String opaque)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Request request)
Applies the authentication result to the given request.java.net.URI
getURI()
private java.lang.String
newClientNonce()
private java.lang.String
nextNonceCount()
private java.lang.String
toHexString(byte[] bytes)
-
-
-
Field Detail
-
nonceCount
private final java.util.concurrent.atomic.AtomicInteger nonceCount
-
header
private final HttpHeader header
-
content
private final byte[] content
-
realm
private final java.lang.String realm
-
user
private final java.lang.String user
-
password
private final java.lang.String password
-
algorithm
private final java.lang.String algorithm
-
nonce
private final java.lang.String nonce
-
qop
private final java.lang.String qop
-
opaque
private final java.lang.String opaque
-
-
Constructor Detail
-
DigestResult
public DigestResult(HttpHeader header, byte[] content, java.lang.String realm, java.lang.String user, java.lang.String password, java.lang.String algorithm, java.lang.String nonce, java.lang.String qop, java.lang.String opaque)
-
-
Method Detail
-
getURI
public java.net.URI getURI()
- Specified by:
getURI
in interfaceAuthentication.Result
- Returns:
- the URI of the request that has been used to generate this
Authentication.Result
-
apply
public void apply(Request request)
Description copied from interface:Authentication.Result
Applies the authentication result to the given request. Typically, aAuthorization
header is added to the request, with the right information to successfully authenticate at the server.- Specified by:
apply
in interfaceAuthentication.Result
- Parameters:
request
- the request to authenticate
-
nextNonceCount
private java.lang.String nextNonceCount()
-
newClientNonce
private java.lang.String newClientNonce()
-
toHexString
private java.lang.String toHexString(byte[] bytes)
-
-