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

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

Open
manodupont opened this issue Nov 4, 2022 · 0 comments
Open

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

manodupont opened this issue Nov 4, 2022 · 0 comments

Comments

@manodupont
Copy link

manodupont commented Nov 4, 2022

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

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

No branches or pull requests

1 participant