MCPcopy
hub / github.com/dghubble/gologin / WithRequestToken

Function WithRequestToken

oauth1/context.go:20–24  ·  view source on GitHub ↗

WithRequestToken returns a copy of ctx that stores the request token and secret values.

(ctx context.Context, requestToken, requestSecret string)

Source from the content-addressed store, hash-verified

18// WithRequestToken returns a copy of ctx that stores the request token and
19// secret values.
20func WithRequestToken(ctx context.Context, requestToken, requestSecret string) context.Context {
21 ctx = context.WithValue(ctx, requestTokenKey, requestToken)
22 ctx = context.WithValue(ctx, requestSecretKey, requestSecret)
23 return ctx
24}
25
26// RequestTokenFromContext returns the request token and secret from the ctx.
27func RequestTokenFromContext(ctx context.Context) (string, string, error) {

Callers 8

TestContextRequestTokenFunction · 0.85
TestAuthRedirectHandlerFunction · 0.85
TestCallbackHandlerFunction · 0.85
LoginHandlerFunction · 0.85
CookieTempHandlerFunction · 0.85
EmptyTempHandlerFunction · 0.85

Calls

no outgoing calls