com.sage.orion.sdata.servlet
Class UnauthorizedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sage.orion.sdata.servlet.UnauthorizedException
All Implemented Interfaces:
java.io.Serializable

public class UnauthorizedException
extends java.lang.RuntimeException

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'.

See Also:
Serialized Form

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

UnauthorizedException

public UnauthorizedException()
Constructs a new UnauthorizedException with null as its detail message and with no underlying cause specified.


UnauthorizedException

public UnauthorizedException(java.lang.String message)
Constructs a new UnauthorizedException with the specified detail message.

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.

UnauthorizedException

public 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).

Parameters:
cause - The underlying Throwable that caused this exception.

UnauthorizedException

public UnauthorizedException(java.lang.String message,
                             java.lang.Throwable cause)
Constructs a new UnauthorizedException with the specified detail message and cause.

Parameters:
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.


Copyright © 2011 Sage Software, Inc. All rights reserved.