Giter Site home page Giter Site logo

flarum-ext-jwt's Introduction

flarum-ext-jwt

Installation

This is a fully plug-n-play solution. All that needs to be done is to add the repository clone url https://github.com/augustine-institute/flarum-ext-jwt.git to the repositories list in your flarum composer.json. After that you can require the package like so:

{
  "augustineinstitute/flarum-ext-jwt": "<version here>"
}

Example Composer.json

{
  "name": "augustine-institute/community-formed-org",
  "description": "Delightfully simple forum software.",
  "type": "project",
  "keywords": [
    "forum",
    "discussion"
  ],
  "homepage": "http://flarum.org",
  "license": "MIT",
  "authors": [
    {
      "name": "Toby Zerner",
      "email": "[email protected]"
    },
    {
      "name": "Franz Liedke",
      "email": "[email protected]"
    }
  ],
  "support": {
    "issues": "https://github.com/dfsklar/core/issues",
    "source": "https://github.com/dfsklar/flarum",
    "docs": "http://flarum.org/docs"
  },
  "require": {
    "flarum/core": "dev-master",
    "flarum/flarum-ext-tags": "dev-some-styles",
    "flarum/flarum-ext-subscriptions": "dev-master",
    "flarum/flarum-ext-mentions": "dev-master",
    "flarum/flarum-ext-likes": "dev-master",
    "flarum/flarum-ext-english": "dev-master",
    "augustineinstitute/flarum-ext-jwt": "*@dev",
    "flarum/flarum-ext-akismet": "^0.1.0",
    "flarum/flarum-ext-approval": "^0.1.0",
    "flarum/flarum-ext-auth-facebook": "^0.1.0",
    "flarum/flarum-ext-auth-github": "^0.1.0",
    "flarum/flarum-ext-auth-twitter": "^0.1.0",
    "flarum/flarum-ext-bbcode": "^0.1.0",
    "flarum/flarum-ext-emoji": "^0.1.0",
    "flarum/flarum-ext-flags": "^0.1.0",
    "flarum/flarum-ext-lock": "^0.1.0",
    "flarum/flarum-ext-markdown": "^0.1.0",
    "flarum/flarum-ext-pusher": "^0.1.0",
    "flarum/flarum-ext-sticky": "^0.1.0",
    "flarum/flarum-ext-suspend": "^0.1.0",
    "flarum/flarum-ext-embed": "^0.1.0"
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "[email protected]:augustine-institute/flarum_core.git"
    },
    {
      "type": "vcs",
      "url": "[email protected]:augustine-institute/flarum-ext-jwt.git"
    },
    {
      "type": "github",
      "url": "https://github.com/augustine-institute/flarum-ext-tags"
    },
    {
      "type": "vcs",
      "url": "https://github.com/dfsklar/flarum-ext-subscriptions"
    },
    {
      "type": "vcs",
      "url": "https://github.com/dfsklar/flarum-ext-mentions"
    },
    {
      "type": "vcs",
      "url": "https://github.com/dfsklar/flarum-ext-likes"
    },
    {
      "type": "vcs",
      "url": "https://github.com/dfsklar/flarum-ext-english"
    }
  ],
  "require-dev": {
    "franzl/studio": "^0.11.0"
  },
  "config": {
    "preferred-install": "dist"
  },
  "minimum-stability": "dev",
  "prefer-stable": true
}

Usage

I have created this with some environment variables that can be set to adjust functionality. Here is the list:

Variable Description
API_SECRET REQUIRED This is the secret use on the api to create the JWT token. This must be set
JWT_API_ONLY Only check on requests to the flarum api routes
JWT_FORUM_ONLY Only check on request to the standard forum routes by regular users
JWT_CHECK_COOKIE Check for a cookie at all?
ENVIRONMENT REQUIRED This should be one of the following: local, stage, beta, production
JWT_ENFORCE Should be enforced at all? If false it will allow users through even if the token or secret doesn't exit or is invalid

flarum-ext-jwt's People

Contributors

cjmrozek avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.