Documentation ¶
Index ¶
- Constants
- Variables
- func AuthHandler() http.Handler
- func Configure(ctx context.Context, mgmtCtx *config.ScaledContext, userMGR user.Manager, ...) common.AuthProvider
- func InitializeSamlServiceProvider(configToSet *v3.SamlConfig, name string) error
- func PerformSamlLogin(name string, apiContext *types.APIContext, input interface{}) error
- type IDPMetadata
- type Provider
- func (s *Provider) AuthenticateUser(input interface{}) (v3.Principal, []v3.Principal, string, error)
- func (s *Provider) CustomizeSchema(schema *types.Schema)
- func (s *Provider) GetName() string
- func (s *Provider) GetPrincipal(principalID string, token v3.Token) (v3.Principal, error)
- func (s *Provider) HandleSamlAssertion(w http.ResponseWriter, r *http.Request, assertion *saml.Assertion)
- func (s *Provider) HandleSamlLogin(w http.ResponseWriter, r *http.Request) (string, error)
- func (s *Provider) SearchPrincipals(searchKey, principalType string, token v3.Token) ([]v3.Principal, error)
- func (s *Provider) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Provider) TransformToAuthProvider(authConfig map[string]interface{}) map[string]interface{}
Constants ¶
View Source
const ADFSName = "adfs"
View Source
const KeyCloakName = "keycloak"
View Source
const PingName = "ping"
Variables ¶
View Source
var SamlProviders = make(map[string]*Provider)
Functions ¶
func AuthHandler ¶
func InitializeSamlServiceProvider ¶
func InitializeSamlServiceProvider(configToSet *v3.SamlConfig, name string) error
func PerformSamlLogin ¶
func PerformSamlLogin(name string, apiContext *types.APIContext, input interface{}) error
Types ¶
type IDPMetadata ¶
type IDPMetadata struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor"` ValidUntil time.Time `xml:"validUntil,attr"` EntityID string `xml:"entityID,attr"` IDPSSODescriptors []saml.IDPSSODescriptor `xml:"IDPSSODescriptor"` SPSSODescriptors []saml.SPSSODescriptor `xml:"SPSSODescriptor"` }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) AuthenticateUser ¶
func (*Provider) CustomizeSchema ¶
func (*Provider) GetPrincipal ¶
func (*Provider) HandleSamlAssertion ¶
func (s *Provider) HandleSamlAssertion(w http.ResponseWriter, r *http.Request, assertion *saml.Assertion)
HandleSamlAssertion processes/handles the assertion obtained by the POST to /saml/acs from IdP
func (*Provider) HandleSamlLogin ¶
HandleSamlLogin is the endpoint for /saml/login endpoint
func (*Provider) SearchPrincipals ¶
func (*Provider) ServeHTTP ¶
func (s *Provider) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is the handler for /saml/metadata and /saml/acs endpoints
func (*Provider) TransformToAuthProvider ¶
Click to show internal directories.
Click to hide internal directories.