MCPcopy Create free account

hub / github.com/discourse/discourse-auth-proxy / functions

Functions57 in github.com/discourse/discourse-auth-proxy

↓ 7 callersFunctionNewStringSet
(s string)
string_set.go:9
↓ 5 callersFunctionGetTestResult
(t *testing.T, configOverride ConfigOverrideFunc, ssoOverride SSOOverrideFunc)
main_test.go:89
↓ 5 callersFunctioncomputeHMAC
computeHMAC implements the Discourse SSO protocol, returning a hex string.
main.go:323
↓ 4 callersFunctionNewTestConfig
()
main_test.go:34
↓ 4 callersFunctionallowedByWhiteList
(c *Config, p string)
main.go:131
↓ 4 callersFunctionmustParseURL
(s string)
main_test.go:26
↓ 4 callersFunctionparseCookie
(data, secret string)
main.go:273
↓ 4 callersFunctionsignCookie
(data, secret string)
main.go:269
↓ 3 callersMethodPrintf
(format string, v ...interface{})
logging.go:24
↓ 2 callersFunctionaddNonce
addNonce takes a return URL and returns a nonce associated to that URL.
main.go:314
↓ 2 callersFunctionauthProxyHandler
(handler http.Handler)
main.go:88
↓ 2 callersFunctioninitDirector
(target *url.URL)
internal/httpproxy/backend.go:195
↓ 2 callersMethodname
name returns the host component from b.target and a boolean indicating whether the host component is likely to be a resolvable name.
internal/httpproxy/backend.go:180
↓ 2 callersFunctionsrvToTCPAddr
(srv *net.SRV)
internal/httpproxy/backend.go:206
↓ 1 callersFunctionBuildTestSSOURL
(options SSOOptions)
main_test.go:72
↓ 1 callersMethodContains
(needle string)
string_set.go:16
↓ 1 callersMethodContainsAny
(needles StringSet)
string_set.go:25
↓ 1 callersMethodLookup
Lookup continuously polls the DNS for new target SRV records. One lookup is made shortly upon entry into this function, then every interval thereafte
internal/httpproxy/backend.go:90
↓ 1 callersFunctionNewDNSSRVBackend
NewDNSSRVBackend returns a new DNSSRVBackend value. The host in target will eventually be queried for DNS SRV records. If none are found, or if the
internal/httpproxy/backend.go:55
↓ 1 callersFunctionNewSSOOptions
(url string, secret string)
main_test.go:53
↓ 1 callersFunctionParseConfig
()
config.go:34
↓ 1 callersFunctionRegisterTestNonce
(t *testing.T, options SSOOptions)
main_test.go:61
↓ 1 callersMethodWrite
(b []byte)
logging.go:41
↓ 1 callersFunctioncheckAuthorizationHeader
(handler http.Handler, r *http.Request, w http.ResponseWriter)
main.go:100
↓ 1 callersFunctioncheckWhitelist
(handler http.Handler, r *http.Request, w http.ResponseWriter)
main.go:145
↓ 1 callersMethodfindDirector
()
internal/httpproxy/backend.go:143
↓ 1 callersFunctiongetReturnUrl
(secret string, payload string, sig string, nonce string)
main.go:248
↓ 1 callersMethodgetSrvs
()
internal/httpproxy/backend.go:161
↓ 1 callersFunctioninitDirectorFromSRV
(target *url.URL, srv *net.SRV)
internal/httpproxy/backend.go:200
↓ 1 callersFunctionlogHandler
(next http.Handler)
logging.go:56
↓ 1 callersMethodlookupOne
(ctx context.Context)
internal/httpproxy/backend.go:133
↓ 1 callersFunctionnewDirectorIDFromSRV
(srv *net.SRV)
internal/httpproxy/backend.go:19
↓ 1 callersFunctionnewRateLimitedLogger
(out io.Writer, prefix string, flag int)
logging.go:17
↓ 1 callersFunctionparseRawConfig
()
config.go:127
↓ 1 callersFunctionrandomJitter
(max time.Duration)
internal/httpproxy/backend.go:259
↓ 1 callersFunctionredirectIfNoCookie
(handler http.Handler, r *http.Request, w http.ResponseWriter)
main.go:154
↓ 1 callersMethodsetSrvs
(srvs []*net.SRV)
internal/httpproxy/backend.go:172
↓ 1 callersFunctionsrvFilterTopPriority
srvFilterTopPriority returns, from srvs, the set of SRV RRs that share the most-preferred priority, whatever that priority value might be. Relative
internal/httpproxy/backend.go:214
↓ 1 callersFunctionsrvShuffleByWeight
srvShuffleByWeight applies the weight shuffling algorithm described in RFC 2782 to a slice of SRV RRs of equivalent priority. This implementation was
internal/httpproxy/backend.go:236
↓ 1 callersFunctionsso_payload
sso_payload takes the SSO secret and the two redirection URLs, stores the returnUrl in the nonce cache, and returns a partial URL querystring.
main.go:303
↓ 1 callersFunctionusage
(err error)
config.go:149
MethodDirector
Director implements a httputil.ReverseProxy Director. The host and port from req are replaced with values taken from an SRV record if any such record
internal/httpproxy/backend.go:128
MethodFlush
()
logging.go:50
MethodHeader
()
logging.go:37
FunctionTestAllowedAnon
(t *testing.T)
main_test.go:168
FunctionTestAllowedGroup
(t *testing.T)
main_test.go:139
FunctionTestBadSecret
(t *testing.T)
main_test.go:111
FunctionTestForbiddenAnon
(t *testing.T)
main_test.go:153
FunctionTestForbiddenGroup
(t *testing.T)
main_test.go:125
FunctionTestInvalidPayloadFails
(t *testing.T)
main_test.go:190
FunctionTestInvalidSecretFails
(t *testing.T)
main_test.go:183
FunctionTestNotWhitelistedPath
(t *testing.T)
main_test.go:206
FunctionTestValidPayload
(t *testing.T)
main_test.go:197
FunctionTestWhitelistedPath
(t *testing.T)
main_test.go:214
FunctionTestWhitelistedPrefixPath
(t *testing.T)
main_test.go:222
MethodWriteHeader
(statusCode int)
logging.go:45
Functionmain
()
main.go:42