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

expiry is not available as a parameter for creating tokens through the API #166

Open
edrichhans opened this issue Aug 19, 2024 · 1 comment

Comments

@edrichhans
Copy link
Contributor

Hi! I love your project, and I was surprised to see this merged #164 when I was trying to set up helm. Hopefully this didn't add more problems to your repo.

I wanted to use the expiry feature in the POST /token endpoint, but it doesn't seem to be available in this open source version

public static function createFromRequest(CreateTokenRequest $request)

However, the cloud version actually has it, and I can see the expiry and expires_at in the response.

May I know what setup you have for this open source version vs what is being hosted in https://webhook.site? I am happy to make a PR to set the expiry on a token-level, but if I can avoid duplicated work, that would be much nicer.

Thank you!

@fredsted
Copy link
Collaborator

Hi Edrich

A simple way to do this would be to add an expiry parameter in the createFromRequest method you linked, use $token->expiry ?? config('app.expiry') rather than simply config('app.expiry')
here: https://github.com/webhooksite/webhook.site/blob/master/app/Storage/Redis/TokenStore.php#L58

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

2 participants