mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-15 10:25:11 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user