Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.
This repository was archived by the owner on May 17, 2019. It is now read-only.

Parity between Koa-Session and Fusion's JWT Session #170

@saumitrabhave

Description

@saumitrabhave

Other koa middlewares (For Eg. koa-passport) , which work with sessions, expect session to be exposed at ctx.session as a plain key-val object. but the JWTSession exposed by this plugin exposes session ONLY as a plugin service, making it impossible to integrate transparently with other koa-middlewares that work with sessions.

Type of issue

Feature Request

Description

When using this plugin as Session Provider in fusion app, any koa-middleware should be able to transparently use it just as if its koa's session (For Eg. koa-session)

Basic requirements for that would be to

  1. Expose session object in context at ctx.session
  2. session should allow access like plain object and should not mandate usage of get and set methods for working with values in session.

Current behavior

Session can only be accessed by creating a fusion plugin and declaring dependency on JWTSession.

Miidlewares written for koa with no consideration of fusion can not access session as these libraries expect session to be exposes as property on context object.

Expected behavior

koa-middlewares should be able to access session via context, For Eg. ctx.session

Steps to reproduce

NA

Your environment

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions