mirror of
https://github.com/rancher/types.git
synced 2025-08-28 00:30:31 +00:00
add KeyCloak Config in types
This commit is contained in:
parent
38a6850257
commit
36b68eaa57
@ -300,3 +300,7 @@ type PingConfig struct {
|
||||
type ADFSConfig struct {
|
||||
SamlConfig `json:",inline" mapstructure:",squash"`
|
||||
}
|
||||
|
||||
type KeyCloakConfig struct {
|
||||
SamlConfig `json:",inline" mapstructure:",squash"`
|
||||
}
|
||||
|
@ -416,34 +416,26 @@ func authnTypes(schemas *types.Schemas) *types.Schemas {
|
||||
MustImport(&Version, v3.FreeIpaTestAndApplyInput{}).
|
||||
// Saml Config
|
||||
// Ping-Saml Config
|
||||
MustImportAndCustomize(&Version, v3.PingConfig{}, func(schema *types.Schema) {
|
||||
schema.BaseType = "authConfig"
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"disable": {},
|
||||
"testAndEnable": {
|
||||
Input: "samlConfigTestInput",
|
||||
Output: "samlConfigTestOutput",
|
||||
},
|
||||
}
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet, http.MethodPut}
|
||||
}).
|
||||
MustImportAndCustomize(&Version, v3.ADFSConfig{}, func(schema *types.Schema) {
|
||||
schema.BaseType = "authConfig"
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"disable": {},
|
||||
"testAndEnable": {
|
||||
Input: "samlConfigTestInput",
|
||||
Output: "samlConfigTestOutput",
|
||||
},
|
||||
}
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet, http.MethodPut}
|
||||
}).
|
||||
MustImportAndCustomize(&Version, v3.PingConfig{}, configSchema).
|
||||
MustImportAndCustomize(&Version, v3.ADFSConfig{}, configSchema).
|
||||
MustImportAndCustomize(&Version, v3.KeyCloakConfig{}, configSchema).
|
||||
MustImport(&Version, v3.SamlConfigTestInput{}).
|
||||
MustImport(&Version, v3.SamlConfigTestOutput{})
|
||||
}
|
||||
|
||||
func configSchema(schema *types.Schema) {
|
||||
schema.BaseType = "authConfig"
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"disable": {},
|
||||
"testAndEnable": {
|
||||
Input: "samlConfigTestInput",
|
||||
Output: "samlConfigTestOutput",
|
||||
},
|
||||
}
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet, http.MethodPut}
|
||||
}
|
||||
|
||||
func userTypes(schema *types.Schemas) *types.Schemas {
|
||||
return schema.
|
||||
MustImportAndCustomize(&Version, v3.Preference{}, func(schema *types.Schema) {
|
||||
|
@ -91,6 +91,10 @@ type ADFSProvider struct {
|
||||
SamlProvider `json:",inline"`
|
||||
}
|
||||
|
||||
type KeyCloakProvider struct {
|
||||
SamlProvider `json:",inline"`
|
||||
}
|
||||
|
||||
type SamlLoginInput struct {
|
||||
FinalRedirectURL string `json:"finalRedirectUrl"`
|
||||
}
|
||||
|
@ -104,6 +104,17 @@ func authProvidersTypes(schemas *types.Schemas) *types.Schemas {
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet}
|
||||
}).
|
||||
MustImportAndCustomize(&PublicVersion, v3public.KeyCloakProvider{}, func(schema *types.Schema) {
|
||||
schema.BaseType = "authProvider"
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"login": {
|
||||
Input: "samlLoginInput",
|
||||
Output: "samlLoginOutput",
|
||||
},
|
||||
}
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet}
|
||||
}).
|
||||
MustImport(&PublicVersion, v3public.SamlLoginInput{}).
|
||||
MustImport(&PublicVersion, v3public.SamlLoginOutput{}).
|
||||
// OpenLdap provider
|
||||
|
Loading…
Reference in New Issue
Block a user