Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable JWT authentication on console requests #14

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 0.2.1

### Fixed

- Application crash on initialization.

## 0.2.0 - 2019-10-06

### Added
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "edenspiekermann/craft-jwt-auth",
"description": "Enable authentication to Craft through the use of JSON Web Tokens (JWT)",
"type": "craft-plugin",
"version": "0.2.0",
"version": "0.2.1",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/CraftJwtAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function init()
parent::init();
self::$plugin = $this;

Craft::$app->on(Application::EVENT_INIT, function (Event $event) {
Event::on(Application::class, Application::EVENT_INIT, function (Event $event) {
$token = self::$plugin->jWT->parseAndVerifyJWT(self::$plugin->jWT->getJWTFromRequest());

// If the token passes verification...
Expand Down