-
Notifications
You must be signed in to change notification settings - Fork 428
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
[KEYCLOAK-14578] Update KeycloakConfig types #250
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beevelop it seems somewhat related to the stale PR here #245. Maybe we could solve it in a single PR? If you would like to do that, I'd suggest to cherry-pick the commit from the original author keeping the authorship and add your commit on top of that.
Otherwise, we can move forward with your PR as is. The issues on Travis seem unrelated to the changes here.
Looks like there are a few more changes in PR #245. So I'd say whatever works best for the reviewers. If the other changes are valid too, I can cherry-pick the respective commits into this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should avoid using quotes around variables.
'clientId': string | ||
'secret': string | ||
'resource'?: string | ||
'public-client'?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type should be changed into boolean here:
* @type {String} |
'resource': string | ||
'ssl-required': string | ||
'realm': string | ||
'clientId': string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'clientId': string | |
clientId: string |
'realm': string | ||
'clientId': string | ||
'secret': string | ||
'resource'?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'resource'?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'resource' or 'client-id' see here:
this.clientId = resolveValue(config.resource || config['client-id'] || config.clientId); |
'auth-server-url': string | ||
'resource': string | ||
'ssl-required': string | ||
'realm': string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'realm': string | |
realm: string |
'ssl-required': string | ||
'realm': string | ||
'clientId': string | ||
'secret': string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'secret': string | |
secret: string |
'bearer-only'?: boolean | ||
realm: string | ||
'plainKey'?: string | ||
'verifyTokenAudience'?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'verifyTokenAudience'?: boolean | |
verifyTokenAudience?: boolean |
'bearer-only'?: boolean | ||
realm: string | ||
'plainKey'?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'plainKey'?: string | |
realmPublicKey?: string |
'clientId': string | ||
'secret': string | ||
'resource'?: string | ||
'public-client'?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'public-client'?: string | |
public?: string |
@@ -18,12 +18,18 @@ interface KeycloakConnectStatic { | |||
declare namespace KeycloakConnect { | |||
|
|||
interface KeycloakConfig { | |||
'confidential-port': string|number | |||
'auth-server-url': string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'auth-server-url': string | |
authServerUrl: string |
'public-client'?: string | ||
'realmUrl'?: string | ||
'realmAdminUrl'?: string | ||
'minTimeBetweenJwksRequests'?: number | ||
'bearer-only'?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'bearer-only'?: boolean | |
bearerOnly?: boolean |
Typescript won't work with this package, maybe it's better to remove .d.ts completely until it's covered by unit tests. |
What's the workaround for using this package with typescript in the meantime? |
I've created a gulp task to replace the definition file in the node_modules folder with a modified one. |
Hi and thanks for reporting,I've got an other similar issue! it's hard to find useful information about this issue since the typescript config
So in my case i can use the missing declared property: |
What is the current status for Typescript support and what was the blocker on this PR? |
Some Types are missing in the current implementation.
Related Jira-Issue: https://issues.redhat.com/browse/KEYCLOAK-14578