Skip to content

Native support for JWT #817

Open
Open
@rdelaage

Description

@rdelaage

What are you building with SQLPage ?

A proof of concept for use as a general purpose engine for declarative apps

What is your problem ? A description of the problem, not the solution you are proposing.

I would like to manage sessions for users with a stateless solution

What are you currently doing ? Since your solution is not implemented in SQLPage currently, what are you doing instead ?

JWT or PHP sessions

Describe the solution you'd like

Provide two built-in functions (like in this project https://github.com/michelp/pgjwt):

  • sqlpage_jwt_sign(payload: json_str, secret: str) -> str provides a JWT signed using the provided secret
  • sqlpage_jwt_verify(jwt_token: str, secret: str) -> |header: json_str|payload: json_str|valid: bool| verifies that the provided JWT and gives the payload and the header

Describe alternatives you've considered

Using https://github.com/michelp/pgjwt

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions