mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-14 04:07:46 +00:00
Resolve issue #85 by adding ability to set custom claims in JWT tokens
This commit is contained in:
@@ -165,6 +165,18 @@ func NewWithContext(ctx context.Context, config *Config, next http.Handler, name
|
||||
}
|
||||
return config.ClientID
|
||||
}(),
|
||||
roleClaimName: func() string {
|
||||
if config.RoleClaimName != "" {
|
||||
return config.RoleClaimName
|
||||
}
|
||||
return "roles" // Backward compatible default
|
||||
}(),
|
||||
groupClaimName: func() string {
|
||||
if config.GroupClaimName != "" {
|
||||
return config.GroupClaimName
|
||||
}
|
||||
return "groups" // Backward compatible default
|
||||
}(),
|
||||
forceHTTPS: config.ForceHTTPS,
|
||||
enablePKCE: config.EnablePKCE,
|
||||
overrideScopes: config.OverrideScopes,
|
||||
|
||||
Reference in New Issue
Block a user