< prev index next >

src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java

Print this page




  45  * DigestAuthentication: Encapsulate an http server authentication using
  46  * the "Digest" scheme, as described in RFC2069 and updated in RFC2617
  47  *
  48  * @author Bill Foote
  49  */
  50 
  51 class DigestAuthentication extends AuthenticationInfo {
  52 
  53     private static final long serialVersionUID = 100L;
  54 
  55     private String authMethod;
  56 
  57     private final static String compatPropName = "http.auth.digest." +
  58         "quoteParameters";
  59 
  60     // true if http.auth.digest.quoteParameters Net property is true
  61     private static final boolean delimCompatFlag;
  62 
  63     static {
  64         Boolean b = AccessController.doPrivileged(
  65             new PrivilegedAction<Boolean>() {
  66                 public Boolean run() {
  67                     return NetProperties.getBoolean(compatPropName);
  68                 }
  69             }
  70         );
  71         delimCompatFlag = (b == null) ? false : b.booleanValue();
  72     }
  73 
  74     // Authentication parameters defined in RFC2617.
  75     // One instance of these may be shared among several DigestAuthentication
  76     // instances as a result of a single authorization (for multiple domains)
  77 
  78     static class Parameters implements java.io.Serializable {
  79         private static final long serialVersionUID = -3584543755194526252L;
  80 
  81         private boolean serverQop; // server proposed qop=auth
  82         private String opaque;
  83         private String cnonce;
  84         private String nonce;
  85         private String algorithm;




  45  * DigestAuthentication: Encapsulate an http server authentication using
  46  * the "Digest" scheme, as described in RFC2069 and updated in RFC2617
  47  *
  48  * @author Bill Foote
  49  */
  50 
  51 class DigestAuthentication extends AuthenticationInfo {
  52 
  53     private static final long serialVersionUID = 100L;
  54 
  55     private String authMethod;
  56 
  57     private final static String compatPropName = "http.auth.digest." +
  58         "quoteParameters";
  59 
  60     // true if http.auth.digest.quoteParameters Net property is true
  61     private static final boolean delimCompatFlag;
  62 
  63     static {
  64         Boolean b = AccessController.doPrivileged(
  65             new PrivilegedAction<>() {
  66                 public Boolean run() {
  67                     return NetProperties.getBoolean(compatPropName);
  68                 }
  69             }
  70         );
  71         delimCompatFlag = (b == null) ? false : b.booleanValue();
  72     }
  73 
  74     // Authentication parameters defined in RFC2617.
  75     // One instance of these may be shared among several DigestAuthentication
  76     // instances as a result of a single authorization (for multiple domains)
  77 
  78     static class Parameters implements java.io.Serializable {
  79         private static final long serialVersionUID = -3584543755194526252L;
  80 
  81         private boolean serverQop; // server proposed qop=auth
  82         private String opaque;
  83         private String cnonce;
  84         private String nonce;
  85         private String algorithm;


< prev index next >