public class Unauthorized extends ErrorResult
HTTP 401 Unauthorized,
Note digest type is not supported yet
Result.Payload| Modifier and Type | Field and Description |
|---|---|
static Unauthorized |
INSTANCE |
| Constructor and Description |
|---|
Unauthorized() |
Unauthorized(String realm) |
Unauthorized(String realm,
boolean digest) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(org.osgl.http.H.Request req,
org.osgl.http.H.Response resp) |
static Unauthorized |
get()
Returns the
static Unauthorized instance |
static Unauthorized |
of(String realm)
Returns a static Unauthorized instance and set the
Result.payload thread local with realm and type |
protected String |
realm() |
protected org.osgl.mvc.result.Unauthorized.Type |
type() |
_localizedErrorMsg, applyMessage, attach, attachment, attachment, defaultMessage, errorCode, errorCode, getLocalizedMessage, of, of, of, of, of, of, of, toJsonString, toKVStore, toStringaddCookie, addHeader, applyAfterCommitHandler, applyBeforeCommitHandler, applyCookies, applyHeaders, applyStatus, clearThreadLocals, header, payload, status, status, statusCode, timestamp, touchPayloaddoFillInStackTrace, fillInStackTraceaddSuppressed, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic static final Unauthorized INSTANCE
public Unauthorized()
public Unauthorized(String realm)
public Unauthorized(String realm, boolean digest)
public void apply(org.osgl.http.H.Request req,
org.osgl.http.H.Response resp)
protected org.osgl.mvc.result.Unauthorized.Type type()
protected String realm()
public static Unauthorized get()
Returns the static Unauthorized instance
public static Unauthorized of(String realm)
Returns a static Unauthorized instance and set the Result.payload thread local with realm and type
When calling the instance on realm() and type() method, it will return whatever stored in the Result.payload thread local
realm - the authentication realmCopyright © 2014–2018 OSGL (Open Source General Library). All rights reserved.