Documentation ¶
Index ¶
- Constants
- func GetAccessToken(t require.TestingT, authServerHost, clientID string, ...) string
- func GetAuthorizationCode(t require.TestingT, authServerHost, clientID, deviceID, scopes string) string
- func GetDefaultAccessToken(t require.TestingT) string
- func GetDefaultDeviceAuthorizationCode(t require.TestingT, deviceID string) string
- func GetJWTValidator(jwkURL string) *jwt.Validator
- func HTTPDo(t require.TestingT, req *http.Request, followRedirect bool) *http.Response
- func MakeConfig(t require.TestingT) service.Config
- func New(t require.TestingT, cfg service.Config) func()
- func SetUp(t require.TestingT) (tearDown func())
- type RequestBuilder
Constants ¶
View Source
const ( ClientTest = "test" // Client with short auth code and access token expiration ClientTestShortExpiration = "testShortExpiration" // Client will return error when the same auth code or refresh token // is used repeatedly within a minute of the first use ClientTestRestrictedAuth = "testRestrictedAuth" // Client with expired access token ClientTestExpired = "testExpired" // Client for C2C testing ClientTestC2C = "testC2C" // Client with configured required params used to verify the authorization and token request query params ClientTestRequiredParams = "requiredParams" // Secret for client with configured required params ClientTestRequiredParamsSecret = "requiredParamsSecret" // Valid refresh token if refresh token restriction policy not configured ValidRefreshToken = "refresh-token" )
Variables ¶
This section is empty.
Functions ¶
func GetAccessToken ¶
func GetAuthorizationCode ¶
func GetDefaultAccessToken ¶
func GetJWTValidator ¶ added in v2.4.0
Types ¶
type RequestBuilder ¶ added in v2.6.2
type RequestBuilder struct {
// contains filtered or unexported fields
}
func NewRequestBuilder ¶ added in v2.6.2
func NewRequestBuilder(method, host, url string, body io.Reader) *RequestBuilder
func (*RequestBuilder) AddQuery ¶ added in v2.6.2
func (c *RequestBuilder) AddQuery(key, value string) *RequestBuilder
func (*RequestBuilder) Build ¶ added in v2.6.2
func (c *RequestBuilder) Build() *http.Request
Click to show internal directories.
Click to hide internal directories.