1
0
mirror of https://github.com/rancher/types.git synced 2025-08-30 10:17:53 +00:00

Add ADFS provider

This commit is contained in:
rajashree 2018-07-23 15:36:08 -07:00 committed by Alena Prokharchyk
parent 1ccee88c0b
commit a4d5b65545
4 changed files with 35 additions and 4 deletions

View File

@ -285,10 +285,6 @@ type SamlConfig struct {
RancherAPIHost string `json:"rancherApiHost" norman:"required"`
}
type PingConfig struct {
SamlConfig `json:",inline" mapstructure:",squash"`
}
type SamlConfigTestInput struct {
FinalRedirectURL string `json:"finalRedirectUrl"`
}
@ -296,3 +292,11 @@ type SamlConfigTestInput struct {
type SamlConfigTestOutput struct {
IdpRedirectURL string `json:"idpRedirectUrl"`
}
type PingConfig struct {
SamlConfig `json:",inline" mapstructure:",squash"`
}
type ADFSConfig struct {
SamlConfig `json:",inline" mapstructure:",squash"`
}

View File

@ -428,6 +428,18 @@ func authnTypes(schemas *types.Schemas) *types.Schemas {
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}
}).
MustImport(&Version, v3.SamlConfigTestInput{}).
MustImport(&Version, v3.SamlConfigTestOutput{})
}

View File

@ -87,6 +87,10 @@ type PingProvider struct {
SamlProvider `json:",inline"`
}
type ADFSProvider struct {
SamlProvider `json:",inline"`
}
type SamlLoginInput struct {
FinalRedirectURL string `json:"finalRedirectUrl"`
}

View File

@ -93,6 +93,17 @@ func authProvidersTypes(schemas *types.Schemas) *types.Schemas {
schema.CollectionMethods = []string{}
schema.ResourceMethods = []string{http.MethodGet}
}).
MustImportAndCustomize(&PublicVersion, v3public.ADFSProvider{}, 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