keycloak / keycloak-nodejs-connect

Apache License 2.0
676 stars 421 forks source link

Property 'content' does not exist on type 'Token' #442

Open manodupont opened 1 year ago

manodupont commented 1 year ago

Describe the bug

The token type in keycloak.d.ts is not completed so when i write for example req.token.content i have this error Property 'content' does not exist on type 'Token'.

Version

16.1.0

Expected behavior

I would expect the Token type to be something like

The type for a token is :

interface Token {
    isExpired(): boolean
    hasRole(roleName: string): boolean
    hasApplicationRole(appName: string, roleName: string): boolean
    hasRealmRole(roleName: string): boolean
    content: <anythinghere>
    ...
  }

Actual behavior

The type for a token is :

interface Token {
    isExpired(): boolean
    hasRole(roleName: string): boolean
    hasApplicationRole(appName: string, roleName: string): boolean
    hasRealmRole(roleName: string): boolean
  }

How to Reproduce?

No response

Anything else?

No response