Skip to content

Why access token does not includes client_id or azp? #646

Answered by muhlemmer
duizabojul asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, good question. You are right.

It seems we forget to assign the value here:

oidc/pkg/oidc/token.go

Lines 107 to 123 in 52e8b65

func NewAccessTokenClaims(issuer, subject string, audience []string, expiration time.Time, jwtid, clientID string, skew time.Duration) *AccessTokenClaims {
now := time.Now().UTC().Add(-skew)
if len(audience) == 0 {
audience = append(audience, clientID)
}
return &AccessTokenClaims{
TokenClaims: TokenClaims{
Issuer: issuer,
Subject: subject,
Audience: audience,
Expiration: FromTime(expiration),
IssuedAt: FromTime(now),
NotBefore: FromTime(now),
JWTID: jwtid,
},
}
}

I…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by muhlemmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants