|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sage.orion.sdata.servlet.UnauthorizedException
public class UnauthorizedException
The UnauthorizedException
exception is to be thrown when a
request requires authentication information of some sort and that information
has not been provided. The SData producer must return a response indicating
that the SData consumer must supply suitable authentication information.
This will normally result in the servlet returning an HTTP SC_UNAUTHORIZED (401) status code.
Do not confuse SC_UNAUTHORIZED (associated with
UnauthorizedException
) with SC_FORBIDDEN (associated with
ForbiddenException
). SC_UNAUTHORIZED represents 'I do not know if you
are allowed to access this resource; I do not know who you are', whereas
SC_FORBIDDEN represents 'Yes, I know who you are but you are not permitted
access to that resource'.
Constructor Summary | |
---|---|
UnauthorizedException()
Constructs a new UnauthorizedException with null as
its detail message and with no underlying cause specified. |
|
UnauthorizedException(java.lang.String message)
Constructs a new UnauthorizedException with the specified detail
message. |
|
UnauthorizedException(java.lang.String message,
java.lang.Throwable cause)
Constructs a new UnauthorizedException with the specified detail
message and cause. |
|
UnauthorizedException(java.lang.Throwable cause)
Constructs a new UnauthorizedException with the specified cause
and a detail message of
(cause==null ? null : cause.toString()) (which typically
contains the class and detail message of cause ). |
Method Summary |
---|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UnauthorizedException()
UnauthorizedException
with null
as
its detail message and with no underlying cause specified.
public UnauthorizedException(java.lang.String message)
UnauthorizedException
with the specified detail
message.
message
- the detail message. The detail message is saved for later
retrieval by the Throwable.getMessage()
method.public UnauthorizedException(java.lang.Throwable cause)
UnauthorizedException
with the specified cause
and a detail message of
(cause==null ? null : cause.toString())
(which typically
contains the class and detail message of cause
).
cause
- The underlying Throwable
that caused this exception.public UnauthorizedException(java.lang.String message, java.lang.Throwable cause)
UnauthorizedException
with the specified detail
message and cause.
message
- the detail message. The detail message is saved for later
retrieval by the Throwable.getMessage()
method.cause
- The underlying Throwable
that caused this exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |