mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 05:07:31 +00:00
fix: some backend bugs (#1438)
* fix: fix setup * fix oidc app change * fix: fix migration and proto * fix: fix granted projects * setup1 apis instead of apps * fix: add object detail with creation date * fix user phone change * add localizer to AddOIDCAppResponse * fix test * fix domain test * fix: converter Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -113,10 +113,13 @@ const (
|
||||
)
|
||||
|
||||
func (a *OIDCApp) IsValid() bool {
|
||||
if a.AppName == "" || a.ClockSkew > time.Second*5 || a.ClockSkew < time.Second*0 {
|
||||
if a.ClockSkew > time.Second*5 || a.ClockSkew < time.Second*0 {
|
||||
return false
|
||||
}
|
||||
grantTypes := a.getRequiredGrantTypes()
|
||||
if len(grantTypes) == 0 {
|
||||
return false
|
||||
}
|
||||
for _, grantType := range grantTypes {
|
||||
ok := containsOIDCGrantType(a.GrantTypes, grantType)
|
||||
if !ok {
|
||||
|
@@ -15,19 +15,6 @@ func TestApplicationValid(t *testing.T) {
|
||||
args args
|
||||
result bool
|
||||
}{
|
||||
{
|
||||
name: "no app name",
|
||||
args: args{
|
||||
app: &OIDCApp{
|
||||
ObjectRoot: models.ObjectRoot{AggregateID: "AggregateID"},
|
||||
AppID: "AppID",
|
||||
AppName: "",
|
||||
ResponseTypes: []OIDCResponseType{OIDCResponseTypeCode},
|
||||
GrantTypes: []OIDCGrantType{OIDCGrantTypeAuthorizationCode},
|
||||
},
|
||||
},
|
||||
result: false,
|
||||
},
|
||||
{
|
||||
name: "invalid clock skew",
|
||||
args: args{
|
||||
|
@@ -4,6 +4,6 @@ import "time"
|
||||
|
||||
type ObjectDetails struct {
|
||||
Sequence uint64
|
||||
ChangeDate time.Time
|
||||
EventDate time.Time
|
||||
ResourceOwner string
|
||||
}
|
||||
|
Reference in New Issue
Block a user