Documentation ¶
Index ¶
- Constants
- func GetAccessTokenBody(accessToken, idToken, refreshToken, clientInfo string, expiresIn int) []byte
- func GetIDToken(tenant, issuer string) string
- func GetInstanceDiscoveryBody(host, tenant string) []byte
- func GetTenantDiscoveryBody(host, tenant string) []byte
- func NewTestAuthnScheme() authority.AuthenticationScheme
- func WithBody(b []byte) responseOption
- func WithCallback(callback func(*http.Request)) responseOption
- type AuthnSchemeTest
- type Client
Constants ¶
View Source
const Authnschemeformat = "%s-formated"
Variables ¶
This section is empty.
Functions ¶
func GetAccessTokenBody ¶
func GetIDToken ¶
func GetTenantDiscoveryBody ¶
func NewTestAuthnScheme ¶ added in v1.2.0
func NewTestAuthnScheme() authority.AuthenticationScheme
func WithBody ¶
func WithBody(b []byte) responseOption
WithBody sets the HTTP response's body to the specified value.
func WithCallback ¶
WithCallback sets a callback to invoke before returning the response.
Types ¶
type AuthnSchemeTest ¶ added in v1.2.0
type AuthnSchemeTest struct { }
func (*AuthnSchemeTest) AccessTokenType ¶ added in v1.2.0
func (a *AuthnSchemeTest) AccessTokenType() string
func (*AuthnSchemeTest) FormatAccessToken ¶ added in v1.2.0
func (a *AuthnSchemeTest) FormatAccessToken(accessToken string) (string, error)
func (*AuthnSchemeTest) KeyID ¶ added in v1.2.0
func (a *AuthnSchemeTest) KeyID() string
func (*AuthnSchemeTest) TokenRequestParams ¶ added in v1.2.0
func (a *AuthnSchemeTest) TokenRequestParams() map[string]string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a mock HTTP client that returns a sequence of responses. Use AppendResponse to specify the sequence.
func (*Client) AppendResponse ¶
func (c *Client) AppendResponse(opts ...responseOption)
func (*Client) CloseIdleConnections ¶
func (*Client) CloseIdleConnections()
CloseIdleConnections implements the comm.HTTPClient interface
Click to show internal directories.
Click to hide internal directories.