lib

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentType string = "Content-Type"
)
View Source
const (
	LocalhostIPAddress = "127.0.0.1"
)

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(ctx context.Context, client *OIDCClient, roleArn string, maxSessionDurationSeconds int32, useSecret, asJson bool) error

func GetCredentialsWithOIDC

func GetCredentialsWithOIDC(ctx context.Context, client *OIDCClient, idToken, iamRoleArn string, durationInSeconds int32) (*types.AWSCredentials, error)

func GetCredentialsWithSAML

func GetCredentialsWithSAML(ctx context.Context, samlResponse string, durationSeconds int32, iamRoleArn string) (*types.AWSCredentials, error)

func RunSetup

func RunSetup(ui *input.UI) error

Types

type OIDCClient

type OIDCClient struct {
	// contains filtered or unexported fields
}

func CheckInstalled

func CheckInstalled(ctx context.Context, name string) (*OIDCClient, error)

func InitializeClient

func InitializeClient(ctx context.Context, ui *input.UI, name string) (*OIDCClient, error)

func (*OIDCClient) Authorization

func (c *OIDCClient) Authorization() *WebTarget

func (*OIDCClient) ClientForm

func (c *OIDCClient) ClientForm() url.Values

func (*OIDCClient) RedirectToFailurePage

func (c *OIDCClient) RedirectToFailurePage() *WebTarget

func (*OIDCClient) RedirectToSuccessfulPage

func (c *OIDCClient) RedirectToSuccessfulPage() *WebTarget

func (*OIDCClient) Token

func (c *OIDCClient) Token() *WebTarget

type OIDCMetadataResponse

type OIDCMetadataResponse struct {
	Issuer                                     string   `json:"issuer"`
	AuthorizationEndpoint                      string   `json:"authorization_endpoint"`
	TokenEndpoint                              string   `json:"token_endpoint"`
	TokenIntrospectionEndpoint                 string   `json:"token_introspection_endpoint"`
	UserinfoEndpoint                           string   `json:"userinfo_endpoint"`
	EndSessionEndpoint                         string   `json:"end_session_endpoint"`
	JwksURI                                    string   `json:"jwks_uri"`
	CheckSessionIframe                         string   `json:"check_session_iframe"`
	GrantTypesSupported                        []string `json:"grant_types_supported"`
	ResponseTypesSupported                     []string `json:"response_types_supported"`
	SubjectTypesSupported                      []string `json:"subject_types_supported"`
	IDTokenSigningAlgValuesSupported           []string `json:"id_token_signing_alg_values_supported"`
	UserinfoSigningAlgValuesSupported          []string `json:"userinfo_signing_alg_values_supported"`
	RequestObjectSigningAlgValuesSupported     []string `json:"request_object_signing_alg_values_supported"`
	ResponseModesSupported                     []string `json:"response_modes_supported"`
	RegistrationEndpoint                       string   `json:"registration_endpoint"`
	TokenEndpointAuthMethodsSupported          []string `json:"token_endpoint_auth_methods_supported"`
	TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported"`
	ClaimsSupported                            []string `json:"claims_supported"`
	ClaimTypesSupported                        []string `json:"claim_types_supported"`
	ClaimsParameterSupported                   bool     `json:"claims_parameter_supported"`
	ScopesSupported                            []string `json:"scopes_supported"`
	RequestParameterSupported                  bool     `json:"request_parameter_supported"`
	RequestURIParameterSupported               bool     `json:"request_uri_parameter_supported"`
	CodeChallengeMethodsSupported              []string `json:"code_challenge_methods_supported"`
	TLSClientCertificateBoundAccessTokens      bool     `json:"tls_client_certificate_bound_access_tokens"`
}

type Request

type Request struct {
	// contains filtered or unexported fields
}

func (*Request) Form

func (r *Request) Form(form url.Values) *Request

func (*Request) Get

func (r *Request) Get(ctx context.Context) (*Response, error)

func (*Request) Post

func (r *Request) Post(ctx context.Context) (*Response, error)

type Response

type Response struct {
	// contains filtered or unexported fields
}

func (*Response) MediaType

func (r *Response) MediaType() string

func (*Response) ReadJson

func (r *Response) ReadJson(data interface{}) error

func (*Response) Status

func (r *Response) Status() int

type RestClient

type RestClient struct {
	// contains filtered or unexported fields
}

func NewRestClient

func NewRestClient(config *RestClientConfig) (*RestClient, error)

func (*RestClient) Target

func (client *RestClient) Target(uri string) *WebTarget

type RestClientConfig

type RestClientConfig struct {
	ClientCert         string
	ClientKey          string
	ClientCA           string
	InsecureSkipVerify bool
}

type WebTarget

type WebTarget struct {
	// contains filtered or unexported fields
}

func (*WebTarget) QueryParam

func (target *WebTarget) QueryParam(name string, value string) *WebTarget

func (*WebTarget) Request

func (target *WebTarget) Request() *Request

func (*WebTarget) Url

func (target *WebTarget) Url() url.URL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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