Class AuthInfo

java.lang.Object
is.galia.auth.AuthInfo

public final class AuthInfo extends Object

Authorization info in HTTP context. Supports simple boolean authorization as well as challenges and redirects to external URIs or scale-constrained versions.

Create instances using one of the inner builder classes.

  • Method Details

    • getChallengeValue

      public String getChallengeValue()
      Returns:
      Value of the WWW-Authenticate header. Will be non- null when getResponseStatus() returns 401, and null otherwise.
    • getRedirectURI

      public String getRedirectURI()
      Returns:
      URI to redirect to. Will be null unless getResponseStatus() returns a 3xx value.
    • getResponseStatus

      public int getResponseStatus()
      Returns:
      HTTP 3xx- or 4xx-level status code. May be null.
    • getScaleConstraint

      public ScaleConstraint getScaleConstraint()
      Returns:
      Virtual scale-constrained image to redirect to. May be null.
    • isAuthorized

      public boolean isAuthorized()
      Returns:
      Whether getResponseStatus() returns a value less than 300.