comms

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const EARLYEXPIRY = 15 * time.Minute
View Source
const TIMEOUT = 30 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type CSRPayload

type CSRPayload struct {
	Csr []byte `json:"csr"`
}

type CertResponseContent

type CertResponseContent struct {
	Cert string `json:"certificate"`
}

type CertResponsePayload

type CertResponsePayload struct {
	Success CertResponseContent `json:"success"`
}

type Client

type Client struct {
	HostGUID   string
	BaseUrl    *url.URL
	HttpClient *http.Client
}

func GetAuthCli

func GetAuthCli(idpURL string, guid string, caCertPool *x509.CertPool) (*Client, error)

func (*Client) ProvisionAccessToken

func (cli *Client) ProvisionAccessToken(ctx context.Context, authConf config.ConfigAuth) (oauth2.Token, error)

func (*Client) ProvisionReleaseServiceToken

func (cli *Client) ProvisionReleaseServiceToken(ctx context.Context, authConf config.ConfigAuth, accessToken string) (oauth2.Token, error)

func (*Client) ProvisionToken

func (cli *Client) ProvisionToken(ctx context.Context, authConf config.ConfigAuth, tknClient auth.ClientAuthToken) (oauth2.Token, error)

Jump to

Keyboard shortcuts

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