-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
Update index.d.ts #542
Update index.d.ts #542
Conversation
Add constructor to OIDCContext class
Hi @vanthome, can you elaborate on the use of this a bit more? |
Look here:
The constructor requires a ctx but this is not reflected in the typings. |
I'm aware of the constructor. I'm just asking if you could elaborate on the use of your own constructed context. I'm curious, never encountered it before. |
The code is originally not from me but I think it's inspired by this: |
Oh man, i'm just curious why you need it (not the change in index.d.ts but the actuall use of it), that's all :) |
Ahh, You mean the module? |
What's the use you have for this? app.use(async (ctx, next) => {
if (!ctx.oidc) {
Object.defineProperty(ctx, 'oidc', { value: new provider.OIDCContext(ctx) });
} |
we have a setup function that initialized the OIDC provider when the application starts up.
And the previously quoted code is then executed in that |
I don’t get what that’s good for but anyway, thanks for your feedback and contribution. |
great, will show you the whole thing when we published it. Can you then make a new release pls? |
I will do a release when there are other, more pressing, unreleased items or periodically on sunday when there are trivial updates such as this one. |
Released, thanks for your contribution. Please consider supporting the development of this and my other packages. |
Add constructor to OIDCContext class.
For me this is necessary as I want to use it like this:
which is impossible with the current typings.