Merge commit from fork

* feat(jwt idp): manage and validate audience

* translations

* fix tests

* address comments

* update migration version

* fix merge
This commit is contained in:
Livio Spring
2026-06-15 15:27:47 +02:00
committed by GitHub
parent fad02c6d9f
commit d184e976fc
57 changed files with 379 additions and 55 deletions
+11 -1
View File
@@ -14,6 +14,7 @@ type JWTIDPAddedEvent struct {
JWTEndpoint string `json:"jwtEndpoint,omitempty"`
KeysEndpoint string `json:"keysEndpoint,omitempty"`
HeaderName string `json:"headerName,omitempty"`
Audience string `json:"audience,omitempty"`
Options
}
@@ -24,7 +25,8 @@ func NewJWTIDPAddedEvent(
issuer,
jwtEndpoint,
keysEndpoint,
headerName string,
headerName,
audience string,
options Options,
) *JWTIDPAddedEvent {
return &JWTIDPAddedEvent{
@@ -35,6 +37,7 @@ func NewJWTIDPAddedEvent(
JWTEndpoint: jwtEndpoint,
KeysEndpoint: keysEndpoint,
HeaderName: headerName,
Audience: audience,
Options: options,
}
}
@@ -69,6 +72,7 @@ type JWTIDPChangedEvent struct {
JWTEndpoint *string `json:"jwtEndpoint,omitempty"`
KeysEndpoint *string `json:"keysEndpoint,omitempty"`
HeaderName *string `json:"headerName,omitempty"`
Audience *string `json:"audience,omitempty"`
OptionChanges
}
@@ -122,6 +126,12 @@ func ChangeJWTHeaderName(headerName string) func(*JWTIDPChangedEvent) {
}
}
func ChangeJWTAudience(audience string) func(*JWTIDPChangedEvent) {
return func(e *JWTIDPChangedEvent) {
e.Audience = &audience
}
}
func ChangeJWTOptions(options OptionChanges) func(*JWTIDPChangedEvent) {
return func(e *JWTIDPChangedEvent) {
e.OptionChanges = options
+3 -1
View File
@@ -304,7 +304,8 @@ func NewJWTIDPAddedEvent(
issuer,
jwtEndpoint,
keysEndpoint,
headerName string,
headerName,
audience string,
options idp.Options,
) *JWTIDPAddedEvent {
@@ -321,6 +322,7 @@ func NewJWTIDPAddedEvent(
jwtEndpoint,
keysEndpoint,
headerName,
audience,
options,
),
}
+3 -1
View File
@@ -304,7 +304,8 @@ func NewJWTIDPAddedEvent(
issuer,
jwtEndpoint,
keysEndpoint,
headerName string,
headerName,
audience string,
options idp.Options,
) *JWTIDPAddedEvent {
@@ -321,6 +322,7 @@ func NewJWTIDPAddedEvent(
jwtEndpoint,
keysEndpoint,
headerName,
audience,
options,
),
}