mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add sourcing secondary claims from access_token (#16517)
Niche edge case, assumes access_token is jwt. Some `access_token`s are JWT's with potential useful claims. These claims would be nearly equivalent to `user_info` claims. This is not apart of the oauth spec, so this feature should not be loudly advertised. If using this feature, alternate solutions are preferred.
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cdr.dev/slog"
|
||||
@@ -88,6 +89,7 @@ func RunIDP() func(t *testing.T) {
|
||||
// This is a static set of auth fields. Might be beneficial to make flags
|
||||
// to allow different values here. This is only required for using the
|
||||
// testIDP as primary auth. External auth does not ever fetch these fields.
|
||||
"sub": uuid.MustParse("26c6a19c-b9b8-493b-a991-88a4c3310314"),
|
||||
"email": "oidc_member@coder.com",
|
||||
"preferred_username": "oidc_member",
|
||||
"email_verified": true,
|
||||
|
||||
Reference in New Issue
Block a user