1
0
mirror of https://github.com/rancher/types.git synced 2025-09-18 16:10:58 +00:00

Change Saml-Ping testAndEnable and login output

Change name of redirectURL
This commit is contained in:
rajashree
2018-07-20 12:16:01 -07:00
committed by Alena Prokharchyk
parent 556fa1f61d
commit 5eb3931b41
4 changed files with 17 additions and 6 deletions

View File

@@ -292,3 +292,7 @@ type PingConfig struct {
type SamlConfigTestInput struct {
FinalRedirectURL string `json:"finalRedirectUrl"`
}
type SamlConfigTestOutput struct {
IdpRedirectURL string `json:"idpRedirectUrl"`
}

View File

@@ -421,13 +421,15 @@ func authnTypes(schemas *types.Schemas) *types.Schemas {
schema.ResourceActions = map[string]types.Action{
"disable": {},
"testAndEnable": {
Input: "samlConfigTestInput",
Input: "samlConfigTestInput",
Output: "samlConfigTestOutput",
},
}
schema.CollectionMethods = []string{}
schema.ResourceMethods = []string{http.MethodGet, http.MethodPut}
}).
MustImport(&Version, v3.SamlConfigTestInput{})
MustImport(&Version, v3.SamlConfigTestInput{}).
MustImport(&Version, v3.SamlConfigTestOutput{})
}
func userTypes(schema *types.Schemas) *types.Schemas {

View File

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

View File

@@ -86,14 +86,15 @@ func authProvidersTypes(schemas *types.Schemas) *types.Schemas {
schema.BaseType = "authProvider"
schema.ResourceActions = map[string]types.Action{
"login": {
Input: "samlLogin",
Output: "token",
Input: "samlLoginInput",
Output: "samlLoginOutput",
},
}
schema.CollectionMethods = []string{}
schema.ResourceMethods = []string{http.MethodGet}
}).
MustImport(&PublicVersion, v3public.SamlLogin{}).
MustImport(&PublicVersion, v3public.SamlLoginInput{}).
MustImport(&PublicVersion, v3public.SamlLoginOutput{}).
// OpenLdap provider
MustImportAndCustomize(&PublicVersion, v3public.OpenLdapProvider{}, func(schema *types.Schema) {
schema.BaseType = "authProvider"