uk.ac.starlink.auth

## Class ProtectionSpace

- java.lang.Object
- - uk.ac.starlink.auth.ProtectionSpace

-     public class ProtectionSpace
      extends java.lang.Object

  Protection Space is a concept defined in RFC7235, aggregating the canonical root URI and an optional realm. It defines the domain within which the same authentication credentials can be applied.
  Since:
    8 Jun 2020
  See Also:
    RFC 7235, section 2.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtectionSpace(java.lang.String proto, java.lang.String authority, java.lang.String realm)` Constructs a ProtectionSpace using URL parts.
    `ProtectionSpace(java.net.URL url, java.lang.String realm)` Constructs a ProtectionSpace using a URL.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object other)`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ProtectionSpace

          public ProtectionSpace(java.lang.String proto,
                                 java.lang.String authority,
                                 java.lang.String realm)

      Constructs a ProtectionSpace using URL parts.
      Parameters:
        `proto` - protocol part of URL, for instance "http"
        `authority` - authority part of URL
        `realm` - challenge realm, or null

    - #### ProtectionSpace

          public ProtectionSpace(java.net.URL url,
                                 java.lang.String realm)

      Constructs a ProtectionSpace using a URL.
      Parameters:
        `url` - URL
        `realm` - challenge realm, or null

  - ### Method Detail

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object other)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`