MCPcopy
hub / github.com/writefreely/writefreely / buildLoginURL

Method buildLoginURL

oauth_generic.go:56–69  ·  view source on GitHub ↗
(state string)

Source from the content-addressed store, hash-verified

54}
55
56func (c genericOauthClient) buildLoginURL(state string) (string, error) {
57 u, err := url.Parse(c.AuthLocation)
58 if err != nil {
59 return "", err
60 }
61 q := u.Query()
62 q.Set("client_id", c.ClientID)
63 q.Set("redirect_uri", c.CallbackLocation)
64 q.Set("response_type", "code")
65 q.Set("state", state)
66 q.Set("scope", c.Scope)
67 u.RawQuery = q.Encode()
68 return u.String(), nil
69}
70
71func (c genericOauthClient) exchangeOauthCode(ctx context.Context, code string) (*TokenResponse, error) {
72 form := url.Values{}

Callers

nothing calls this directly

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected