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

Fix to work with laravel 5.5 #17

Merged
merged 8 commits into from
Oct 28, 2017
Merged
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
9 changes: 7 additions & 2 deletions src/Console/KeyGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ class KeyGenerateCommand extends Command
*/
protected $signature = 'jwt:generate';

public function fire()
{
$this->handle();
}

/**
* Execute the command that will generate and print a key.
*
* @return void
*/
public function fire()
public function handle()
{
// call the action to generate a new key.
$key = $this->generateRandomKey();
Expand Down Expand Up @@ -80,4 +85,4 @@ protected function printBlock(array $lines, $style, $firstBlock = false)
// empty ending line.
$this->line('');
}
}
}
2 changes: 1 addition & 1 deletion src/Token/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public function issue(Authenticatable $user, array $additionalCustomClaims = [])
$builder->setIssuer($this->issuer);

// set the subject.
$builder->setSubject($user->{$user->getAuthIdentifierName()});
$builder->setSubject($user->getAuthIdentifier());

// generate a unique id for the token, and set it to replicate as a header.
$builder->setId($this->generateId(), true);
Expand Down