jexpresso-session

A JExpresso middleware providing user sessions.

License

License

GroupId

GroupId

de.yourinspiration
ArtifactId

ArtifactId

jexpresso-session
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

jexpresso-session
A JExpresso middleware providing user sessions.
Project URL

Project URL

https://github.com/Yourinspiration/jexpresso-session
Project Organization

Project Organization

Yourinspiration
Source Code Management

Source Code Management

https://github.com/Yourinspiration/jexpresso-session.git

Download jexpresso-session

How to add to project

<!-- https://jarcasting.com/artifacts/de.yourinspiration/jexpresso-session/ -->
<dependency>
    <groupId>de.yourinspiration</groupId>
    <artifactId>jexpresso-session</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/de.yourinspiration/jexpresso-session/
implementation 'de.yourinspiration:jexpresso-session:1.0.1'
// https://jarcasting.com/artifacts/de.yourinspiration/jexpresso-session/
implementation ("de.yourinspiration:jexpresso-session:1.0.1")
'de.yourinspiration:jexpresso-session:jar:1.0.1'
<dependency org="de.yourinspiration" name="jexpresso-session" rev="1.0.1">
  <artifact name="jexpresso-session" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.yourinspiration', module='jexpresso-session', version='1.0.1')
)
libraryDependencies += "de.yourinspiration" % "jexpresso-session" % "1.0.1"
[de.yourinspiration/jexpresso-session "1.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
de.yourinspiration : jexpresso jar 1.1.1
org.mongodb : mongo-java-driver jar 2.12.3

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-all jar 1.9.5

Project Modules

There are no modules declared in this project.

JExpresso Session Support Middleware

Middleware for JExpresso providing session support.

Maven

Latest stable release:

<dependency>
  <groupId>de.yourinspiration</groupId>
  <artifactId>jexpresso-session</artifactId>
  <version>1.0.1</version>
</dependency>

Usage

General

The session data will be stored as a request attribute. To retrieve the current session call the attribute() method of the request object, or use the static helper method of the JExpressoSession class.

Session session = (Session) req.attribute(JExpressoSession.SESSION_ATTR);
Session session = JExpressoSession.session(req);

The Session interface provides methods to get and set data from/to the session, and a method to invalidate the current session.

In Memory Store

final JExpresso app = new JExpresso();
app.use(new JExpressoSession(new InMemoryStore()));

Versions

Version
1.0.1
1.0.0