|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.xmla.impl.AuthenticatingXmlaRequestCallback
public abstract class AuthenticatingXmlaRequestCallback
This is an abstract implementation of XmlaRequestCallback
specialized in authenticating the requests coming in. Subclasses are
only required to implement authenticate(String, String, String).
Once implemented, you only need to register your class using the XMLA servlet config, within your web.xml descriptor.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface mondrian.xmla.XmlaRequestCallback |
|---|
XmlaRequestCallback.Helper |
| Field Summary |
|---|
| Fields inherited from interface mondrian.xmla.XmlaRequestCallback |
|---|
AUTHORIZATION, EXPECT, EXPECT_100_CONTINUE |
| Constructor Summary | |
|---|---|
AuthenticatingXmlaRequestCallback()
|
|
| Method Summary | |
|---|---|
abstract String |
authenticate(String username,
String password,
String sessionID)
This function is expected to do two things. |
String |
generateSessionId(Map<String,Object> context)
The Callback is requested to generate a sequence id string. |
void |
init(ServletConfig servletConfig)
|
void |
postAction(HttpServletRequest request,
HttpServletResponse response,
byte[][] responseSoapParts,
Map<String,Object> context)
This is called after all Mondrian processing (DISCOVER/EXECUTE) has occurred. |
void |
preAction(HttpServletRequest request,
Element[] requestSoapParts,
Map<String,Object> context)
This is called after the headers have been process but before the body (DISCOVER/EXECUTE) has been processed. |
boolean |
processHttpHeader(HttpServletRequest request,
HttpServletResponse response,
Map<String,Object> context)
Process the request header items. |
protected void |
throwAuthenticationException(String reason)
Helper method to create and throw an authentication exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticatingXmlaRequestCallback()
| Method Detail |
|---|
public String generateSessionId(Map<String,Object> context)
XmlaRequestCallbacknull if they do not want
to generate a custom session ID, in which case, the default algorithm
to generate session IDs will be used.
generateSessionId in interface XmlaRequestCallbackcontext - The context of this query.
null.
public void init(ServletConfig servletConfig)
throws ServletException
init in interface XmlaRequestCallbackServletException
public void postAction(HttpServletRequest request,
HttpServletResponse response,
byte[][] responseSoapParts,
Map<String,Object> context)
throws Exception
XmlaRequestCallback
postAction in interface XmlaRequestCallbackException
public void preAction(HttpServletRequest request,
Element[] requestSoapParts,
Map<String,Object> context)
throws Exception
XmlaRequestCallback
preAction in interface XmlaRequestCallbackException
public abstract String authenticate(String username,
String password,
String sessionID)
Should there be any problems with the credentials, subclasses
can invoke throwAuthenticationException(String) to throw
an authentication exception back to the client.
username - Username used for authentication, as specified
in the SOAP security header. Might be null.password - Password used for authentication, as specified
in the SOAP security header. Might be null.sessionID - A unique identifier for this client session.
Session IDs should remain the same between different queries from
a same client, although some clients do not implement the XMLA
Session header properly, resulting in a new session ID for each
request.
null for root access.protected void throwAuthenticationException(String reason)
reason - A textual explanation of why the credentials are
rejected.
public boolean processHttpHeader(HttpServletRequest request,
HttpServletResponse response,
Map<String,Object> context)
throws Exception
XmlaRequestCallbackNote that it is upto the XMLA client to determine whether or not there is an Expect header entry (ADOMD.NET seems to like to do this).
processHttpHeader in interface XmlaRequestCallbackException
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||