provider

package
v2.30.1-0...-fef39ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAttemptsCount = 1
	DefaultRetryDelay    = time.Duration(1) * time.Second
)

Variables

This section is empty.

Functions

func NewDefaultTransport

func NewDefaultTransport(skipVerify bool) *http.Transport

NewDefaultTransport configure a transport with the TLS skip verify option

func SuccessOrRedirectResponseValidator

func SuccessOrRedirectResponseValidator(req *http.Request, resp *http.Response) error

SuccessOrRedirectResponseValidator this validates the response code is within range of 200 - 399

Types

type HTTPClient

type HTTPClient struct {
	http.Client
	CheckResponseStatus func(*http.Request, *http.Response) error
	Options             *HTTPClientOptions
}

HTTPClient saml2aws http client which extends the existing client

func NewHTTPClient

func NewHTTPClient(tr http.RoundTripper, opts *HTTPClientOptions) (*HTTPClient, error)

NewHTTPClient configure the default http client used by the providers

func (*HTTPClient) DisableFollowRedirect

func (hc *HTTPClient) DisableFollowRedirect()

DisableFollowRedirect disable redirects

func (*HTTPClient) Do

func (hc *HTTPClient) Do(req *http.Request) (*http.Response, error)

Do do the request

func (*HTTPClient) EnableFollowRedirect

func (hc *HTTPClient) EnableFollowRedirect()

EnableFollowRedirect enable redirects

type HTTPClientOptions

type HTTPClientOptions struct {
	IsWithRetries bool //http retry feature switch
	AttemptsCount uint
	RetryDelay    time.Duration
}

func BuildHttpClientOpts

func BuildHttpClientOpts(account *cfg.IDPAccount) *HTTPClientOptions

type ValidateBase

type ValidateBase struct {
}

func (*ValidateBase) Validate

func (ac *ValidateBase) Validate(ld *creds.LoginDetails) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL