Class AuthInfo
java.lang.Object
is.galia.auth.AuthInfo
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Creates an instance that allows or denies a request.static final class
Creates an instance that is restrictive in some way—it may redirect to a scale-constrained version of an image, for example. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
-
Method Details
-
getChallengeValue
- Returns:
- Value of the WWW-Authenticate header. Will be non-
null
whengetResponseStatus()
returns401
, andnull
otherwise.
-
getRedirectURI
- Returns:
- URI to redirect to. Will be
null
unlessgetResponseStatus()
returns a 3xx value.
-
getResponseStatus
public int getResponseStatus()- Returns:
- HTTP 3xx- or 4xx-level status code. May be
null
.
-
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.
-