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

[Feature request] v3 wish list #381

Closed
ankurk91 opened this issue Jul 23, 2022 · 5 comments
Closed

[Feature request] v3 wish list #381

ankurk91 opened this issue Jul 23, 2022 · 5 comments

Comments

@ankurk91
Copy link
Contributor

Hi @driesvints

I noticed that v3 is around the corner now.
I am trying bring the most requested features here.

1. Prevent updating last_used_at on each request

The last_used_at column is getting updated on every request.

Related PR/issues

Possible solutions

  • Use app()->terminating() callback
  • OR Use a lottery to update the column
  • OR A config option to configure the time interval, for example every 15 minutes

2. Expiry per token

I think it is already in the plan.

Related PR

3. Use native model pruning

We can use native model:prune command now and can make the package slim by removing the PruneCommand Command

Related PR

4. Remove deprecated Middleware

  • CheckScopes
  • CheckForAnyScope

5. Introduce tokenHasAbility() method on Model

Allows to check specific ability, it its different from $token->can, can() returns true when it is * in abilities

public function tokenHasAbility(string $ability): bool
{
      return $this->accessToken && array_key_exists($ability, array_flip($this->accessToken->abilities));
}
@driesvints
Copy link
Member

Thanks @ankurk91. That's helpful! I'll remember this issue when I'm creating tomorrow's changelog.

@driesvints
Copy link
Member

@ankurk91 seems most of these features weren't implemented yet. Will have to wait until the next major release if people are willing to pr something

@ankurk91
Copy link
Contributor Author

The last_used_at is most requested one, please consider this in version 3.x

@driesvints
Copy link
Member

v3 has already been released. If you want to propose that than feel free to send it to master for v4 👍

@MostafaRabia
Copy link

What about last_used_at now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants