mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
feat: select idp and auto register (#2336)
* faet: auto regsiter config on idp * feat: auto register on login * feat: auto register on register * feat: redirect to selected identity provider * fix: test * fix: test * fix: user by id request org id * fix: migration version and test Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -18,29 +18,31 @@ func IDPViewsToPb(idps []*iam_model.IDPConfigView) []*idp_pb.IDP {
|
||||
|
||||
func ModelIDPViewToPb(idp *iam_model.IDPConfigView) *idp_pb.IDP {
|
||||
return &idp_pb.IDP{
|
||||
Id: idp.IDPConfigID,
|
||||
State: ModelIDPStateToPb(idp.State),
|
||||
Name: idp.Name,
|
||||
StylingType: ModelIDPStylingTypeToPb(idp.StylingType),
|
||||
Owner: ModelIDPProviderTypeToPb(idp.IDPProviderType),
|
||||
Config: ModelIDPViewToConfigPb(idp),
|
||||
Id: idp.IDPConfigID,
|
||||
State: ModelIDPStateToPb(idp.State),
|
||||
Name: idp.Name,
|
||||
StylingType: ModelIDPStylingTypeToPb(idp.StylingType),
|
||||
AutoRegister: idp.AutoRegister,
|
||||
Owner: ModelIDPProviderTypeToPb(idp.IDPProviderType),
|
||||
Config: ModelIDPViewToConfigPb(idp),
|
||||
Details: obj_grpc.ToViewDetailsPb(
|
||||
idp.Sequence,
|
||||
idp.CreationDate,
|
||||
idp.ChangeDate,
|
||||
"", //TODO: backend
|
||||
idp.AggregateID,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
func IDPViewToPb(idp *domain.IDPConfigView) *idp_pb.IDP {
|
||||
mapped := &idp_pb.IDP{
|
||||
Id: idp.AggregateID,
|
||||
State: IDPStateToPb(idp.State),
|
||||
Name: idp.Name,
|
||||
StylingType: IDPStylingTypeToPb(idp.StylingType),
|
||||
Config: IDPViewToConfigPb(idp),
|
||||
Details: obj_grpc.ToViewDetailsPb(idp.Sequence, idp.CreationDate, idp.ChangeDate, ""), //TODO: resource owner in view
|
||||
Id: idp.AggregateID,
|
||||
State: IDPStateToPb(idp.State),
|
||||
Name: idp.Name,
|
||||
StylingType: IDPStylingTypeToPb(idp.StylingType),
|
||||
AutoRegister: idp.AutoRegister,
|
||||
Config: IDPViewToConfigPb(idp),
|
||||
Details: obj_grpc.ToViewDetailsPb(idp.Sequence, idp.CreationDate, idp.ChangeDate, idp.AggregateID),
|
||||
}
|
||||
return mapped
|
||||
}
|
||||
|
Reference in New Issue
Block a user