|
EAF 7.6 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lutris.http.BasicAuth
public class BasicAuth
Methods to be used to implement the HTTP Basic Auth authorization method. This is the standard username/password mechanism in use all over the web.
Note: the username and password are sent over the net base64 encoded, which is practically clear text. So this method is no more secure than the communication channel being used.
Usage:
When a request comes in, before responding to it, call
getAuthentication()
. It will return the username and
password that was sent along with the request. If no authorization was
sent, null is returned. The caller is then responsible for deciding if
the username and password are valid.
If the caller decides that the authorization is not sufficient,
a PageUnauthorizedException
should be thrown.
If you are writing a LBS application, the recommended place to put
this processing is in your Application's requestPreprocessor()
function. That function is called for every request, before the
presentation objects are called.
PageUnauthorizedException
Method Summary | |
---|---|
static BasicAuthResult |
getAuthentication(com.lutris.appserver.server.httpPresentation.HttpPresentationRequest req)
Checks to see if the authorization matches the given username and password. |
static BasicAuthResult |
getAuthentication(javax.servlet.http.HttpServletRequest req)
Extracts and returns the username and password using the HTTP Basic Auth method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BasicAuthResult getAuthentication(com.lutris.appserver.server.httpPresentation.HttpPresentationRequest req)
req
- The request to authenticate.
public static BasicAuthResult getAuthentication(javax.servlet.http.HttpServletRequest req)
req
- The request to authenticate.
|
EAF 7.6 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |