Documentation ¶
Index ¶
- Constants
- func DefaultFakeIntrospectorCookiesName() []string
- func DefaultFakeIntrospectorHeadersName() []string
- func DefaultFakeIntrospectorQueryParamsName() []string
- func DefaultHeader() http.Header
- func FakeBackendService(t *testing.T, host string) *httptest.Server
- func FakeCaptchaService(t *testing.T, host string) *httptest.Server
- func FakeIntrospectorService(t *testing.T, host string) *httptest.Server
- func FakeService(t *testing.T, host string, handler http.Handler) *httptest.Server
- type GoogleRecaptchaResponse
- type HTTPBody
Constants ¶
View Source
const ( GetEndpoint = "/api/v1/check_get" PostEndpoint = "/api/v1/check_post" PutEndpoint = "/api/v1/check_put" DefaultFakeServiceHost = "localhost:10000" DefaultFakeServiceURL = "http://" + DefaultFakeServiceHost DefaultGetAnswer = "it's a get request" DefaultPostAnswer = "it's a post request" DefaultPutAnswer = "it's a put request" )
View Source
const ( DefaultFakeCaptchaHost = "localhost:10002" DefaultFakeCaptchaURL = "http://" + DefaultFakeCaptchaHost DefaultFakeCaptchaEndpoint = "/siteverify" DefaultFakeCaptchaKey = "captcha_key" DefaultFakeGoodCaptcha = "good_captcha" DefaultFakeBadCaptcha = "bad_captcha" DefaultFakeCaptchaSign = "test_sign" )
View Source
const ( DefaultFakeIntrospectorHost = "localhost:10001" DefaultFakeIntrospectorURL = "http://" + DefaultFakeIntrospectorHost DefaultFakeIntrospectorEndpoint = "/oauth2/introspect" DefaultFakeIntrospectorContentType = "application/x-www-form-urlencoded" DefaultFakeIntrospectorMethod = "POST" DefaultFakeIntrospectorValidMarker = `"active":true` DefaultFakeIntrospectorBodyTemplate = `token_type_hint=access_token&token={{.Token}}` DefaultFakeIntrospectorCookieName = "access-token" DefaultFakeIntrospectorQueryParamName = "access_token" DefaultFakeIntrospectorHeaderName = "authorization" TestToken = "goodToken" BadToken = "badToken" )
View Source
const (
ContentTypeFormUrlencoded = "application/x-www-form-urlencoded"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultFakeIntrospectorCookiesName ¶
func DefaultFakeIntrospectorCookiesName() []string
func DefaultFakeIntrospectorHeadersName ¶
func DefaultFakeIntrospectorHeadersName() []string
func DefaultFakeIntrospectorQueryParamsName ¶
func DefaultFakeIntrospectorQueryParamsName() []string
func DefaultHeader ¶
func FakeIntrospectorService ¶
Types ¶
type GoogleRecaptchaResponse ¶
Click to show internal directories.
Click to hide internal directories.