DefaultSessionContext

Default implementation of the {@link SessionContext} interface which provides getters and setters that wrap interaction with the underlying backing context map.

Constructors

this
this()
Undocumented in source.
this
this(Map!(string, Object) map)
Undocumented in source.

Members

Functions

getHost
string getHost()
Undocumented in source. Be warned that the author may not have intended to support it.
getSessionId
string getSessionId()
Undocumented in source. Be warned that the author may not have intended to support it.
setHost
void setHost(string host)
Undocumented in source. Be warned that the author may not have intended to support it.
setSessionId
void setSessionId(string sessionId)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From MapContext

getTypedValue
E getTypedValue(string key)

Performs a {@link #get get} operation but additionally ensures that the value returned is of the specified {@code type}. If there is no value, {@code null} is returned.

nullSafePut
void nullSafePut(string key, Object value)

Places a value in this context map under the given key only if the given {@code value} argument is not null.

size
int size()
Undocumented in source. Be warned that the author may not have intended to support it.
isEmpty
bool isEmpty()
Undocumented in source. Be warned that the author may not have intended to support it.
containsKey
bool containsKey(string o)
Undocumented in source. Be warned that the author may not have intended to support it.
containsValue
bool containsValue(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
get
Object get(string o)
Undocumented in source. Be warned that the author may not have intended to support it.
put
Object put(string s, Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
Object remove(string o)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
bool remove(string key, Object value)
Undocumented in source. Be warned that the author may not have intended to support it.
putAll
void putAll(Map!(string, Object) map)
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
replace
bool replace(string key, Object oldValue, Object newValue)
Undocumented in source. Be warned that the author may not have intended to support it.
replace
Object replace(string key, Object value)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
putIfAbsent
Object putIfAbsent(string key, Object value)
Undocumented in source. Be warned that the author may not have intended to support it.
values
Object[] values()
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
Object opIndex(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(ref string, ref Object) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(MapEntry!(string, Object) entry) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
byKey
InputRange!string byKey()
Undocumented in source. Be warned that the author may not have intended to support it.
byValue
InputRange!Object byValue()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(IObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
__anonymous
mixin CloneMemberTemplate!(typeof(this))
Undocumented in source.

From SessionContext

setHost
void setHost(string host)

Sets the originating host name or IP address (as a string) from where the {@code Subject} is initiating the {@code Session}. <p/> In web-based systems, this host can be inferred from the incoming request, e.g. {@code javax.servlet.ServletRequest#getRemoteAddr()} or {@code javax.servlet.ServletRequest#getRemoteHost()} methods, or in socket-based systems, it can be obtained via inspecting the socket initiator's host IP. <p/> Most secure environments <em>should</em> specify a valid, non-{@code null} {@code host}, since knowing the {@code host} allows for more flexibility when securing a system: by requiring an host, access control policies can also ensure access is restricted to specific client <em>locations</em> in addition to {@code Subject} principals, if so desired. <p/> <b>Caveat</b> - if clients to your system are on a public network (as would be the case for a public web site), odds are high the clients can be behind a NAT (Network Address Translation) router or HTTP proxy server. If so, all clients accessing your system behind that router or proxy will have the same originating host. If your system is configured to allow only one session per host, then the next request from a different NAT or proxy client will fail and access will be denied for that client. Just be aware that host-based security policies are best utilized in LAN or private WAN environments when you can be ensure clients will not share IPs or be behind such NAT routers or proxy servers.

getHost
string getHost()

Returns the originating host name or IP address (as a string) from where the {@code Subject} is initiating the {@code Session}. <p/> See the {@link #setHost(string) setHost(string)} JavaDoc for more about security policies based on the {@code Session} host.

getSessionId
string getSessionId()
Undocumented in source.
setSessionId
void setSessionId(string sessionId)
Undocumented in source.

Meta