github.com/versent/saml2aws@v2.17.0+incompatible/pkg/creds/creds.go (about) 1 package creds 2 3 import "errors" 4 5 // LoginDetails used to authenticate 6 type LoginDetails struct { 7 ClientID string // used by OneLogin 8 ClientSecret string // used by OneLogin 9 Username string 10 Password string 11 MFAToken string 12 DuoMFAOption string 13 URL string 14 } 15 16 // Validate validate the login details 17 func (ld *LoginDetails) Validate() error { 18 if ld.URL == "" { 19 return errors.New("Empty URL") 20 } 21 if ld.Username == "" { 22 return errors.New("Empty username") 23 } 24 if ld.Password == "" { 25 return errors.New("Empty password") 26 } 27 return nil 28 }