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

JWT Payload type for roles is incorrect #48

Closed
benpetty opened this issue May 6, 2024 · 2 comments · Fixed by #49
Closed

JWT Payload type for roles is incorrect #48

benpetty opened this issue May 6, 2024 · 2 comments · Fixed by #49
Assignees
Labels
bug Something isn't working released

Comments

@benpetty
Copy link

benpetty commented May 6, 2024

The interface for JwtPayload has the roles property as a list of strings, but the actual value returned seems to be a list of Role objects which look something like:

export interface Role {
  owner: string
  name: string
  createdTime: string
  displayName: string
  description: string
  users: any
  groups: string[]
  roles: any[]
  domains: any[]
  isEnabled: boolean
}

This is giving me some grief in typescript where i'm trying to access role.name in code

roles: string[];

@casbin-bot
Copy link

@casbin-bot casbin-bot added the question Further information is requested label May 6, 2024
@hsluoyz hsluoyz added bug Something isn't working and removed question Further information is requested labels May 7, 2024
Copy link

github-actions bot commented May 7, 2024

🎉 This issue has been resolved in version 0.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants