EAF 7.4 API

com.lutris.appserver.server.httpPresentation
Class PageUnauthorizedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.lutris.appserver.server.httpPresentation.PageUnauthorizedException
All Implemented Interfaces:
java.io.Serializable

public class PageUnauthorizedException
extends java.lang.RuntimeException

Throwing this class will cause a 401 Unauthorized response.

Author:
Andy John
See Also:
com.lutris.http.BasicAuth, Serialized Form

Constructor Summary
PageUnauthorizedException(java.lang.String requestedRelm)
          Create a new unauthorized exception.
PageUnauthorizedException(java.lang.String requestedRelm, java.lang.String htmlDisplayText)
          Create a new unauthorized exception.
 
Method Summary
 java.lang.String getHtmlText()
          Get the text to display in the client.
 java.lang.String getHtmlTitle()
          Get the title to use for the HTML page.
 java.lang.String getRelm()
          Get the relm that was passed in to the constructor.
 
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

PageUnauthorizedException

public PageUnauthorizedException(java.lang.String requestedRelm)
Create a new unauthorized exception.

Parameters:
relm - The relm to ask for. This string is used by the browser in the prompt for username and password. It should identify to the user which system they are logging in to, i.e. which username and password to use. For example, if relm is XXX, then Netscape Navigator will prompt the user with "Enter the username for XXX at :".

PageUnauthorizedException

public PageUnauthorizedException(java.lang.String requestedRelm,
                                 java.lang.String htmlDisplayText)
Create a new unauthorized exception.

Parameters:
relm - The relm to ask for. This string is used by the browser in the prompt for username and password. It should identify to the user which system they are logging in to, i.e. which username and password to use. For example, if relm is XXX, then Netscape Navigator will prompt the user with "Enter the username for XXX at :".
htmlDisplayText - Text to display on the page. If null, a default will be used.
Method Detail

getRelm

public java.lang.String getRelm()
Get the relm that was passed in to the constructor. This is used as part of the prompt to the user by the browser.

Returns:
The relm string.

getHtmlTitle

public java.lang.String getHtmlTitle()
Get the title to use for the HTML page.

Returns:
The title string.

getHtmlText

public java.lang.String getHtmlText()
Get the text to display in the client.

Returns:
The HTML text.

EAF 7.4 API