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 classCreates an instance that allows or denies a request.static final classCreates 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 TypeMethodDescriptionintboolean
-
Method Details
-
getChallengeValue
- Returns:
- Value of the WWW-Authenticate header. Will be non-
nullwhengetResponseStatus()returns401, andnullotherwise.
-
getRedirectURI
- Returns:
- URI to redirect to. Will be
nullunlessgetResponseStatus()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.
-