mirror of
https://github.com/rancher/types.git
synced 2025-07-03 00:36:12 +00:00
revert azure ad config in api
This commit is contained in:
parent
a38685bab0
commit
dd36f2ea13
@ -151,21 +151,3 @@ type ActiveDirectoryTestAndApplyInput struct {
|
||||
Password string `json:"password"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
}
|
||||
|
||||
type AzureADConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
AuthConfig `json:",inline" mapstructure:",squash"`
|
||||
|
||||
TenantID string `json:"tenantId,omitempty" norman:"required"`
|
||||
ClientID string `json:"clientId,omitempty" norman:"required"`
|
||||
Domain string `json:"domain,omitempty" norman:"required"`
|
||||
ClientSecret string `json:"clientSecret,omitempty"`
|
||||
}
|
||||
|
||||
type AzureADTestAndApplyInput struct {
|
||||
AzureADConfig AzureADConfig `json:"azureAdConfig, omitempty"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
}
|
||||
|
@ -326,21 +326,7 @@ func authnTypes(schemas *types.Schemas) *types.Schemas {
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet, http.MethodPut}
|
||||
}).
|
||||
MustImport(&Version, v3.ActiveDirectoryTestAndApplyInput{}).
|
||||
// AzureAD Config
|
||||
MustImportAndCustomize(&Version, v3.AzureADConfig{}, func(schema *types.Schema) {
|
||||
schema.BaseType = "authConfig"
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"disable": {},
|
||||
"testAndApply": {
|
||||
Input: "azureADTestAndApplyInput",
|
||||
},
|
||||
}
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet, http.MethodPut}
|
||||
}).
|
||||
MustImport(&Version, v3.AzureADTestAndApplyInput{})
|
||||
|
||||
MustImport(&Version, v3.ActiveDirectoryTestAndApplyInput{})
|
||||
}
|
||||
|
||||
func userTypes(schema *types.Schemas) *types.Schemas {
|
||||
|
@ -49,9 +49,3 @@ type ActiveDirectoryProvider struct {
|
||||
|
||||
DefaultLoginDomain string `json:"defaultLoginDomain,omitempty"`
|
||||
}
|
||||
|
||||
type AzureADProvider struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
AuthProvider `json:",inline"`
|
||||
}
|
||||
|
@ -67,17 +67,5 @@ func authProvidersTypes(schemas *types.Schemas) *types.Schemas {
|
||||
}
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet}
|
||||
}).
|
||||
// AzureAD provider
|
||||
MustImportAndCustomize(&PublicVersion, v3public.AzureADProvider{}, func(schema *types.Schema) {
|
||||
schema.BaseType = "authProvider"
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"login": {
|
||||
Input: "basicLogin",
|
||||
Output: "token",
|
||||
},
|
||||
}
|
||||
schema.CollectionMethods = []string{}
|
||||
schema.ResourceMethods = []string{http.MethodGet}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user