Package com.appliedolap.essbase.impl
Class SessionCookieAuthentication
java.lang.Object
com.appliedolap.essbase.impl.SessionCookieAuthentication
- All Implemented Interfaces:
EssAuthentication
An already-established session, presented as cookies.
Sends no Authorization header at all. That isn't an oversight: Essbase accepts the session
cookies on their own, and there is no username or password here to build one from - which is the entire
point of this strategy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe value for theAuthorizationheader, or null to send none.The value for theCookieheader, or null to send none.voidobserveSetCookies(List<String> setCookieHeaders) Picks up how long this session has left.voidStops presenting the session.When the current session expires, if that is known.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.appliedolap.essbase.EssAuthentication
username
-
Constructor Details
-
SessionCookieAuthentication
- Parameters:
sessionId- theJSESSIONIDvalueweblogicAuthCookie- the_WL_AUTHCOOKIE_JSESSIONIDvalue, or null if there isn't one
-
-
Method Details
-
authorizationHeader
Description copied from interface:EssAuthenticationThe value for theAuthorizationheader, or null to send none. Null is meaningful rather than a degenerate case - a cookie-borne session needs noAuthorizationheader.- Specified by:
authorizationHeaderin interfaceEssAuthentication
-
cookieHeader
Description copied from interface:EssAuthenticationThe value for theCookieheader, or null to send none.- Specified by:
cookieHeaderin interfaceEssAuthentication
-
observeSetCookies
Picks up how long this session has left.A session supplied from outside arrives with no expiry attached, but the server reports one on every response, so it can simply be read as requests go by. Worth doing precisely because this strategy has nothing to fall back on: a password-backed session that dies re-authenticates silently, whereas this one just starts failing, so being able to say "12 minutes left" before that happens is the difference between a prompt and a puzzle.
- Specified by:
observeSetCookiesin interfaceEssAuthentication- Parameters:
setCookieHeaders- everySet-Cookieheader value on the response, possibly empty
-
sessionExpiry
Description copied from interface:EssAuthenticationWhen the current session expires, if that is known. Essbase reports it in asessionExpirycookie alongside the session itself, so it is only ever known for a session this library established.- Specified by:
sessionExpiryin interfaceEssAuthentication
-
sessionEnded
public void sessionEnded()Stops presenting the session. There is nothing to fall back to, which is correct - signing off is what the caller asked for - but continuing to send cookies the server has discarded would turn a clear "no credentials" into a confusing "these credentials are rejected".- Specified by:
sessionEndedin interfaceEssAuthentication
-