Skip to content

oidcclaimquery: better error handling for casting #3216

Open
@MustafaSaber

Description

@MustafaSaber

Describe the bug

if oidcclaimsquery get a jwt token that doesn't have sub for any reason it will fail to cast nil to string.

sub := token.Claims["sub"].(string)

To Reproduce

use a token without sub

Expected behavior

Better error handling instead of failing without clue what is happening.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions