csp

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeCSPHandler

func FakeCSPHandler(apiTokens []string) http.Handler

Types

type APITokenClient

type APITokenClient struct {
	BaseURL  string
	APIToken string
}

func (*APITokenClient) GetAccessToken

func (c *APITokenClient) GetAccessToken() (*AuthorizeResponse, error)

type AuthorizeResponse

type AuthorizeResponse struct {
	IDToken     string `json:"id_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int64  `json:"expires_in"`
	Scope       string `json:"scope"`
	AccessToken string `json:"access_token"`
}

type Client

type Client interface {
	GetAccessToken() (*AuthorizeResponse, error)
}

type ClientCredentialsClient

type ClientCredentialsClient struct {
	BaseURL      string
	ClientID     string
	ClientSecret string
	OrgID        *string
}

func (*ClientCredentialsClient) GetAccessToken

func (c *ClientCredentialsClient) GetAccessToken() (*AuthorizeResponse, error)

Jump to

Keyboard shortcuts

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